{"thread":{"id":"46957","subject":"[PATCH v1 1/1] completion: add remaining flags to checkout","startedAt":"2017-10-12T12:21:34Z","lastAt":"2017-10-25T06:22:52Z","messageCount":8,"participants":["Thomas Braun","Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"330277","messageId":"20171012122059.17242-1-thomas.braun@virtuell-zuhause.de","threadId":"46957","inReplyTo":null,"subject":"[PATCH v1 1/1] completion: add remaining flags to checkout","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-10-12T12:20:59Z","receivedAt":"2017-10-12T12:21:34Z","isPatch":true,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"In the commits 1d0fa898 (checkout: add --ignore-other-wortrees,\n2015-01-03), 1fc458d9 (builtin/checkout: add --recurse-submodules switch,\n2017-03-14), 870ebdb9 (checkout: add --progress option, 2015-11-01),\n08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout\nmode, 2013-04-13), 1d0fa898 (checkout: add --ignore-other-wortrees,\n2015-01-03), 32669671 (checkout: introduce --detach synonym for \"git\ncheckout foo^{commit}\", 2011-02-08) and db941099 (checkout -f: allow\nignoring unmerged paths when checking out of the index, 2008-08-30)\ncheckout gained new flags but the completion was not updated, although\nthese flags are useful completions. Add them.\n\nSigned-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n---\n contrib/completion/git-completion.bash | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex d934417475..393d4ae230 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1250,7 +1250,9 @@ _git_checkout ()\n \t--*)\n \t\t__gitcomp \"\n \t\t\t--quiet --ours --theirs --track --no-track --merge\n-\t\t\t--conflict= --orphan --patch\n+\t\t\t--conflict= --orphan --patch --detach --progress --no-progress\n+\t\t\t--force --ignore-skip-worktree-bits --ignore-other-worktrees\n+\t\t\t--recurse-submodules --no-recurse-submodules\n \t\t\t\"\n \t\t;;\n \t*)\n-- \n2.15.0.rc0.245.g6d586db062\n\n"},{"id":"330292","messageId":"5bc82075-0fb2-0929-2da7-d9069222a3fe@kdbg.org","threadId":"46957","inReplyTo":"20171012122059.17242-1-thomas.braun@virtuell-zuhause.de","subject":"Re: [PATCH v1 1/1] completion: add remaining flags to checkout","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2017-10-12T16:50:24Z","receivedAt":"2017-10-12T16:51:08Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 12.10.2017 um 14:20 schrieb Thomas Braun:\n> In the commits 1d0fa898 (checkout: add --ignore-other-wortrees,\n> 2015-01-03), 1fc458d9 (builtin/checkout: add --recurse-submodules switch,\n> 2017-03-14), 870ebdb9 (checkout: add --progress option, 2015-11-01),\n> 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout\n> mode, 2013-04-13), 1d0fa898 (checkout: add --ignore-other-wortrees,\n> 2015-01-03), 32669671 (checkout: introduce --detach synonym for \"git\n> checkout foo^{commit}\", 2011-02-08) and db941099 (checkout -f: allow\n> ignoring unmerged paths when checking out of the index, 2008-08-30)\n> checkout gained new flags but the completion was not updated, although\n> these flags are useful completions. Add them.\n> \n> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n> ---\n>   contrib/completion/git-completion.bash | 4 +++-\n>   1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index d934417475..393d4ae230 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1250,7 +1250,9 @@ _git_checkout ()\n>   \t--*)\n>   \t\t__gitcomp \"\n>   \t\t\t--quiet --ours --theirs --track --no-track --merge\n> -\t\t\t--conflict= --orphan --patch\n> +\t\t\t--conflict= --orphan --patch --detach --progress --no-progress\n> +\t\t\t--force --ignore-skip-worktree-bits --ignore-other-worktrees\n\nDestructive and dangerous options are typically not offered by command \ncompletion. You should omit all three in the line above, IMO.\n\nFurthermore, --progress and --no-progress are not useful in daily work \non the command line, I think. By offering them, --p<TAB> would not \ncomplete to --patch anymore, you would need --pa<TAB>. You should omit \nthem, too.\n\n> +\t\t\t--recurse-submodules --no-recurse-submodules\n>   \t\t\t\"\n>   \t\t;;\n>   \t*)\n> \n\n-- Hannes\n"},{"id":"330306","messageId":"d1bbd196-ad9f-cb22-a363-43b113a354ce@kdbg.org","threadId":"46957","inReplyTo":"5bc82075-0fb2-0929-2da7-d9069222a3fe@kdbg.org","subject":"Re: [PATCH v1 1/1] completion: add remaining flags to checkout","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2017-10-12T20:30:13Z","receivedAt":"2017-10-12T20:30:57Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 12.10.2017 um 18:50 schrieb Johannes Sixt:\n> Am 12.10.2017 um 14:20 schrieb Thomas Braun:\n>> +            --force --ignore-skip-worktree-bits --ignore-other-worktrees\n> \n> Destructive and dangerous options are typically not offered by command \n> completion. You should omit all three in the line above, IMO.\n\nAh, no, only --force and --ignore-other-worktrees are dangerous, \n--ignore-skip-worktree-bits is not.\n\n-- Hannes\n"},{"id":"330910","messageId":"1989036170.30614.1508851107354@ox.hosteurope.de","threadId":"46957","inReplyTo":"5bc82075-0fb2-0929-2da7-d9069222a3fe@kdbg.org","subject":"Re: [PATCH v1 1/1] completion: add remaining flags to checkout","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-10-24T13:18:27Z","receivedAt":"2017-10-24T13:19:53Z","isPatch":true,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"\n> Johannes Sixt <j6t@kdbg.org> hat am 12. Oktober 2017 um 18:50 geschrieben:\n> \n> \n> Am 12.10.2017 um 14:20 schrieb Thomas Braun:\n> > In the commits 1d0fa898 (checkout: add --ignore-other-wortrees,\n> > 2015-01-03), 1fc458d9 (builtin/checkout: add --recurse-submodules switch,\n> > 2017-03-14), 870ebdb9 (checkout: add --progress option, 2015-11-01),\n> > 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout\n> > mode, 2013-04-13), 1d0fa898 (checkout: add --ignore-other-wortrees,\n> > 2015-01-03), 32669671 (checkout: introduce --detach synonym for \"git\n> > checkout foo^{commit}\", 2011-02-08) and db941099 (checkout -f: allow\n> > ignoring unmerged paths when checking out of the index, 2008-08-30)\n> > checkout gained new flags but the completion was not updated, although\n> > these flags are useful completions. Add them.\n> > \n> > Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n> > ---\n> >   contrib/completion/git-completion.bash | 4 +++-\n> >   1 file changed, 3 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> > index d934417475..393d4ae230 100644\n> > --- a/contrib/completion/git-completion.bash\n> > +++ b/contrib/completion/git-completion.bash\n> > @@ -1250,7 +1250,9 @@ _git_checkout ()\n> >   \t--*)\n> >   \t\t__gitcomp \"\n> >   \t\t\t--quiet --ours --theirs --track --no-track --merge\n> > -\t\t\t--conflict= --orphan --patch\n> > +\t\t\t--conflict= --orphan --patch --detach --progress --no-progress\n> > +\t\t\t--force --ignore-skip-worktree-bits --ignore-other-worktrees\n> \n> Destructive and dangerous options are typically not offered by command \n> completion. You should omit all three in the line above, IMO.\n> \n> Furthermore, --progress and --no-progress are not useful in daily work \n> on the command line, I think. By offering them, --p<TAB> would not \n> complete to --patch anymore, you would need --pa<TAB>. You should omit \n> them, too.\n\nThanks for the review.\n\nI've fixed that for the next reroll.\n"},{"id":"330911","messageId":"20171024131931.18221-1-thomas.braun@virtuell-zuhause.de","threadId":"46957","inReplyTo":"20171012122059.17242-1-thomas.braun@virtuell-zuhause.de","subject":"[PATCH v2 1/1] completion: add remaining flags to checkout","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-10-24T13:19:31Z","receivedAt":"2017-10-24T13:19:55Z","isPatch":true,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules\nswitch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits\nin sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce\n--detach synonym for \"git checkout foo^{commit}\", 2011-02-08) checkout\ngained new flags but the completion was not updated, although these flags\nare useful completions. Add them.\n\nThe flags --force and --ignore-other-worktrees are not added as they are\npotentially dangerous.\n\nThe flags --progress and --no-progress are only useful for scripting and are\ntherefore also not included.\n\nSigned-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n---\n contrib/completion/git-completion.bash | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex d934417475..eb6ade6974 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1250,7 +1250,8 @@ _git_checkout ()\n \t--*)\n \t\t__gitcomp \"\n \t\t\t--quiet --ours --theirs --track --no-track --merge\n-\t\t\t--conflict= --orphan --patch\n+\t\t\t--conflict= --orphan --patch --detach --ignore-skip-worktree-bits\n+\t\t\t--recurse-submodules --no-recurse-submodules\n \t\t\t\"\n \t\t;;\n \t*)\n-- \n2.15.0.rc0.245.g6d586db062\n\n"},{"id":"330925","messageId":"be2e0547-5ef7-c9d9-baad-44f5fa9d3c31@kdbg.org","threadId":"46957","inReplyTo":"20171024131931.18221-1-thomas.braun@virtuell-zuhause.de","subject":"Re: [PATCH v2 1/1] completion: add remaining flags to checkout","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2017-10-24T16:45:05Z","receivedAt":"2017-10-24T16:45:13Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 24.10.2017 um 15:19 schrieb Thomas Braun:\n> In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules\n> switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits\n> in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce\n> --detach synonym for \"git checkout foo^{commit}\", 2011-02-08) checkout\n> gained new flags but the completion was not updated, although these flags\n> are useful completions. Add them.\n> \n> The flags --force and --ignore-other-worktrees are not added as they are\n> potentially dangerous.\n> \n> The flags --progress and --no-progress are only useful for scripting and are\n> therefore also not included.\n> \n> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n> ---\n>   contrib/completion/git-completion.bash | 3 ++-\n>   1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index d934417475..eb6ade6974 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1250,7 +1250,8 @@ _git_checkout ()\n>   \t--*)\n>   \t\t__gitcomp \"\n>   \t\t\t--quiet --ours --theirs --track --no-track --merge\n> -\t\t\t--conflict= --orphan --patch\n> +\t\t\t--conflict= --orphan --patch --detach --ignore-skip-worktree-bits\n> +\t\t\t--recurse-submodules --no-recurse-submodules\n>   \t\t\t\"\n>   \t\t;;\n>   \t*)\n> \n\nLooks good to me. Thanks,\n-- Hannes\n\n"},{"id":"330993","messageId":"xmqqefprix2c.fsf@gitster.mtv.corp.google.com","threadId":"46957","inReplyTo":"be2e0547-5ef7-c9d9-baad-44f5fa9d3c31@kdbg.org","subject":"Re: [PATCH v2 1/1] completion: add remaining flags to checkout","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-25T06:03:07Z","receivedAt":"2017-10-25T06:03:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n>> The flags --force and --ignore-other-worktrees are not added as they are\n>> potentially dangerous.\n>>\n>> The flags --progress and --no-progress are only useful for scripting and are\n>> therefore also not included.\n>>\n>> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n>> ---\n>>   contrib/completion/git-completion.bash | 3 ++-\n>>   1 file changed, 2 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index d934417475..eb6ade6974 100644\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -1250,7 +1250,8 @@ _git_checkout ()\n>>   \t--*)\n>>   \t\t__gitcomp \"\n>>   \t\t\t--quiet --ours --theirs --track --no-track --merge\n>> -\t\t\t--conflict= --orphan --patch\n>> +\t\t\t--conflict= --orphan --patch --detach --ignore-skip-worktree-bits\n>> +\t\t\t--recurse-submodules --no-recurse-submodules\n>>   \t\t\t\"\n>>   \t\t;;\n>>   \t*)\n>>\n>\n> Looks good to me. Thanks,\n> -- Hannes\n\nDoesn't quite.  This breaks t9902, doesn't it?\n"},{"id":"330994","messageId":"xmqqa80fiw5m.fsf@gitster.mtv.corp.google.com","threadId":"46957","inReplyTo":"xmqqefprix2c.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 1/1] completion: add remaining flags to checkout","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-25T06:22:45Z","receivedAt":"2017-10-25T06:22:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Johannes Sixt <j6t@kdbg.org> writes:\n>\n>>> The flags --force and --ignore-other-worktrees are not added as they are\n>>> potentially dangerous.\n>>>\n>>> The flags --progress and --no-progress are only useful for scripting and are\n>>> therefore also not included.\n>>>\n>>> Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>\n>>> ---\n>>>   contrib/completion/git-completion.bash | 3 ++-\n>>>   1 file changed, 2 insertions(+), 1 deletion(-)\n>>>\n>>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>>> index d934417475..eb6ade6974 100644\n>>> --- a/contrib/completion/git-completion.bash\n>>> +++ b/contrib/completion/git-completion.bash\n>>> @@ -1250,7 +1250,8 @@ _git_checkout ()\n>>>   \t--*)\n>>>   \t\t__gitcomp \"\n>>>   \t\t\t--quiet --ours --theirs --track --no-track --merge\n>>> -\t\t\t--conflict= --orphan --patch\n>>> +\t\t\t--conflict= --orphan --patch --detach --ignore-skip-worktree-bits\n>>> +\t\t\t--recurse-submodules --no-recurse-submodules\n>>>   \t\t\t\"\n>>>   \t\t;;\n>>>   \t*)\n>>>\n>>\n>> Looks good to me. Thanks,\n>> -- Hannes\n>\n> Doesn't quite.  This breaks t9902, doesn't it?\n\nI've queued it with the following squashed in.\n\n t/t9902-completion.sh | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 2cb999ecfa..fc614dcbfa 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -1245,6 +1245,10 @@ test_expect_success 'double dash \"git checkout\"' '\n \t--conflict=\n \t--orphan Z\n \t--patch Z\n+\t--detach Z\n+\t--ignore-skip-worktree-bits Z\n+\t--recurse-submodules Z\n+\t--no-recurse-submodules Z\n \tEOF\n '\n \n"}]}