On Mon, Aug 10, 2015 at 6:10 PM, Junio C Hamano gits...@pobox.com wrote:
Michael Rappazzo rappa...@gmail.com writes:
+static int list(int ac, const char **av, const char *prefix)
+{
+ int main_only = 0;
+ struct option options[] = {
+ OPT_BOOL(0, main-only, main_only,
On Mon, Aug 10, 2015 at 10:55 PM, David Turner dtur...@twopensource.com wrote:
On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
+ while ((d = readdir(dir)) != NULL) {
I think it would be useful to break this loop out into a
for_each_worktree function.
While
Mike Rappazzo rappa...@gmail.com writes:
+ int is_bare = is_bare_repository();
Please do not introduce decl-after-stmt.
Since I reused this value below, I thought it would be acceptable.
Use of a new variable is fine. Do not declare one in a block after
you already wrote statement is
David Turner dtur...@twopensource.com writes:
On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
+while ((d = readdir(dir)) != NULL) {
I think it would be useful to break this loop out into a
for_each_worktree function.
Very good point.
--
To unsubscribe from
Differences from
[v2](http://www.mail-archive.com/git@vger.kernel.org/msg75467.html)
- removed unintended whitespace changes
- cleanup based on comments from v2
Michael Rappazzo (1):
worktree: add 'list' command
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c |
'git worktree list' will list the main worktree followed by any linked
worktrees which were created using 'git worktree add'.
Signed-off-by: Michael Rappazzo rappa...@gmail.com
---
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c | 67
Michael Rappazzo rappa...@gmail.com writes:
+static int list(int ac, const char **av, const char *prefix)
+{
+ int main_only = 0;
+ struct option options[] = {
+ OPT_BOOL(0, main-only, main_only, N_(only list the main
worktree)),
+ OPT_END()
+ };
Hmm,
On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
+ while ((d = readdir(dir)) != NULL) {
I think it would be useful to break this loop out into a
for_each_worktree function.
While looking into per-worktree ref stuff, I have just noticed that git
prune will delete
8 matches
Mail list logo