{"thread":{"id":"36696","subject":"Bash completion: merge --abort","startedAt":"2014-05-19T08:36:54Z","lastAt":"2014-05-22T23:59:11Z","messageCount":4,"participants":["Haralan Dobrev","John Keeping","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"242147","messageId":"CANu1nikzk-rGjzKv6R-OR6Et-fB-JYnt245+P6NY-RQiihzXyA@mail.gmail.com","threadId":"36696","inReplyTo":null,"subject":"Bash completion: merge --abort","fromName":"Haralan Dobrev","fromEmail":"hkdobrev@gmail.com","sentAt":"2014-05-19T08:36:54Z","receivedAt":"2014-05-19T08:36:54Z","isPatch":false,"sender":{"key":"hkdobrev@gmail.com","avatar":null},"body":"Hi all!\n\nThe Git Bash completion script does not complete the `--abort` option\nfor the `merge ` command.\n\nIt correctly completes the other flags.\nIt correctly completes the `--abort` flag for `rebase` and others.\n\n`git merge --abort` is considered another form of the merge command\ninstead of a simple option.\nThis could be the cause of the completion to be missed from the script.\n\nCheers!\n"},{"id":"242485","messageId":"e4a536d29a59d7dc89cc2f42fa8339506b4829f1.1400767118.git.john@keeping.me.uk","threadId":"36696","inReplyTo":"CANu1nikzk-rGjzKv6R-OR6Et-fB-JYnt245+P6NY-RQiihzXyA@mail.gmail.com","subject":"[PATCH 1/2] completion: add a note that merge options are shared","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2014-05-22T13:58:37Z","receivedAt":"2014-05-22T13:58:37Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"This should avoid future confusion after a subsequent patch has added\nsome options to __git_merge_options and some directly in _git_merge().\n\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n contrib/completion/git-completion.bash | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 2c59a76..ff97c20 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1472,6 +1472,7 @@ _git_log ()\n \t__git_complete_revlist\n }\n \n+# Common merge options shared by git-merge(1) and git-pull(1).\n __git_merge_options=\"\n \t--no-commit --no-stat --log --no-log --squash --strategy\n \t--commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit\n-- \n2.0.0.rc2.4.g1dc51c6\n"},{"id":"242486","messageId":"5cfeac0e9b7fb0ff4a2468f30476152fc93f4c16.1400767118.git.john@keeping.me.uk","threadId":"36696","inReplyTo":"e4a536d29a59d7dc89cc2f42fa8339506b4829f1.1400767118.git.john@keeping.me.uk","subject":"[PATCH 2/2] completion: add missing options for git-merge","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2014-05-22T13:58:38Z","receivedAt":"2014-05-22T13:58:38Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"The options added to __git_merge_options are those that git-pull also\nunderstands, since that variable is used by both commands.  Those added\ndirectly in _git_merge() are specific to git-merge and are not\nsupported by git-pull.\n\nReported-by: Haralan Dobrev <hkdobrev@gmail.com>\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n contrib/completion/git-completion.bash | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex ff97c20..019026e 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1476,6 +1476,8 @@ _git_log ()\n __git_merge_options=\"\n \t--no-commit --no-stat --log --no-log --squash --strategy\n \t--commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit\n+\t--verify-signatures --no-verify-signatures --gpg-sign\n+\t--quiet --verbose --progress --no-progress\n \"\n \n _git_merge ()\n@@ -1484,7 +1486,8 @@ _git_merge ()\n \n \tcase \"$cur\" in\n \t--*)\n-\t\t__gitcomp \"$__git_merge_options\"\n+\t\t__gitcomp \"$__git_merge_options\n+\t\t\t--rerere-autoupdate --no-rerere-autoupdate --abort\"\n \t\treturn\n \tesac\n \t__gitcomp_nl \"$(__git_refs)\"\n-- \n2.0.0.rc2.4.g1dc51c6\n"},{"id":"242548","messageId":"xmqqiooxl60g.fsf@gitster.dls.corp.google.com","threadId":"36696","inReplyTo":"5cfeac0e9b7fb0ff4a2468f30476152fc93f4c16.1400767118.git.john@keeping.me.uk","subject":"Re: [PATCH 2/2] completion: add missing options for git-merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-22T23:59:11Z","receivedAt":"2014-05-22T23:59:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Keeping <john@keeping.me.uk> writes:\n\n> The options added to __git_merge_options are those that git-pull also\n> understands, since that variable is used by both commands.  Those added\n> directly in _git_merge() are specific to git-merge and are not\n> supported by git-pull.\n\nInteresting.\n\nTechnically, \"are not passed through\" would be more accurate than\n\"are not supported\", as there may be a very good reason not to call\n\"git merge --frotz\" from \"git pull --frotz=nitfol\".  In such a case,\n\"git pull\" would _support_ the \"--frotz\" option, but in a different\nway and possibly with semantics different from \"git merge --frotz\"\n(i.e. option with value vs boolean), and completion of the\n\"--frotz=<value>\" option may need to be supported for \"git pull\"\nseparately without using $__git_merge_options.\n\nThe patch makes us think if \"--[no-]rerere-autoupdate\" should be a\npass-thru option.  You are unlikely to have seen the same conflict\nthat will arise from a pull from another person for autoupdate to\nmatter, but on the other hand, if you do have seen one and resolved\nit already, you may want the autoupdate to kick in, so accepting and\npassing it through may not be an unreasonable thing to do.\n\nAs long as we declare that \"git pull --abort\" does not make any\nsense (which I think is a sane declaration), the distinction you\nmade in [PATCH 1/2] will always be with us, whether we make\n\"--rerere-autoupdate\" pass-thru or not, so in that sense, both\npatches make sense to me.\n\nThanks.\n\n>\n> Reported-by: Haralan Dobrev <hkdobrev@gmail.com>\n> Signed-off-by: John Keeping <john@keeping.me.uk>\n> ---\n>  contrib/completion/git-completion.bash | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index ff97c20..019026e 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1476,6 +1476,8 @@ _git_log ()\n>  __git_merge_options=\"\n>  \t--no-commit --no-stat --log --no-log --squash --strategy\n>  \t--commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit\n> +\t--verify-signatures --no-verify-signatures --gpg-sign\n> +\t--quiet --verbose --progress --no-progress\n>  \"\n>  \n>  _git_merge ()\n> @@ -1484,7 +1486,8 @@ _git_merge ()\n>  \n>  \tcase \"$cur\" in\n>  \t--*)\n> -\t\t__gitcomp \"$__git_merge_options\"\n> +\t\t__gitcomp \"$__git_merge_options\n> +\t\t\t--rerere-autoupdate --no-rerere-autoupdate --abort\"\n>  \t\treturn\n>  \tesac\n>  \t__gitcomp_nl \"$(__git_refs)\"\n"}]}