Re: [PATCH v2 1/1] completion: add remaining flags to checkout
Junio C Hamano writes: > Johannes Sixt writes: > >>> The flags --force and --ignore-other-worktrees are not added as they are >>> potentially dangerous. >>> >>> The flags --progress and --no-progress are only useful for scripting and are >>> therefore also not included. >>> >>> Signed-off-by: Thomas Braun >>> --- >>> contrib/completion/git-completion.bash | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/contrib/completion/git-completion.bash >>> b/contrib/completion/git-completion.bash >>> index d934417475..eb6ade6974 100644 >>> --- a/contrib/completion/git-completion.bash >>> +++ b/contrib/completion/git-completion.bash >>> @@ -1250,7 +1250,8 @@ _git_checkout () >>> --*) >>> __gitcomp " >>> --quiet --ours --theirs --track --no-track --merge >>> - --conflict= --orphan --patch >>> + --conflict= --orphan --patch --detach >>> --ignore-skip-worktree-bits >>> + --recurse-submodules --no-recurse-submodules >>> " >>> ;; >>> *) >>> >> >> Looks good to me. Thanks, >> -- Hannes > > Doesn't quite. This breaks t9902, doesn't it? I've queued it with the following squashed in. t/t9902-completion.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 2cb999ecfa..fc614dcbfa 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1245,6 +1245,10 @@ test_expect_success 'double dash "git checkout"' ' --conflict= --orphan Z --patch Z + --detach Z + --ignore-skip-worktree-bits Z + --recurse-submodules Z + --no-recurse-submodules Z EOF '
Re: [PATCH v2 1/1] completion: add remaining flags to checkout
Johannes Sixt writes: >> The flags --force and --ignore-other-worktrees are not added as they are >> potentially dangerous. >> >> The flags --progress and --no-progress are only useful for scripting and are >> therefore also not included. >> >> Signed-off-by: Thomas Braun >> --- >> contrib/completion/git-completion.bash | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/contrib/completion/git-completion.bash >> b/contrib/completion/git-completion.bash >> index d934417475..eb6ade6974 100644 >> --- a/contrib/completion/git-completion.bash >> +++ b/contrib/completion/git-completion.bash >> @@ -1250,7 +1250,8 @@ _git_checkout () >> --*) >> __gitcomp " >> --quiet --ours --theirs --track --no-track --merge >> ---conflict= --orphan --patch >> +--conflict= --orphan --patch --detach >> --ignore-skip-worktree-bits >> +--recurse-submodules --no-recurse-submodules >> " >> ;; >> *) >> > > Looks good to me. Thanks, > -- Hannes Doesn't quite. This breaks t9902, doesn't it?
Re: [PATCH v2 1/1] completion: add remaining flags to checkout
Am 24.10.2017 um 15:19 schrieb Thomas Braun: In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce --detach synonym for "git checkout foo^{commit}", 2011-02-08) checkout gained new flags but the completion was not updated, although these flags are useful completions. Add them. The flags --force and --ignore-other-worktrees are not added as they are potentially dangerous. The flags --progress and --no-progress are only useful for scripting and are therefore also not included. Signed-off-by: Thomas Braun --- contrib/completion/git-completion.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index d934417475..eb6ade6974 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1250,7 +1250,8 @@ _git_checkout () --*) __gitcomp " --quiet --ours --theirs --track --no-track --merge - --conflict= --orphan --patch + --conflict= --orphan --patch --detach --ignore-skip-worktree-bits + --recurse-submodules --no-recurse-submodules " ;; *) Looks good to me. Thanks, -- Hannes