{"thread":{"id":"15014","subject":"[PATCH 1/2] bash completion: Add completion for 'git mergetool'","startedAt":"2008-08-14T22:41:09Z","lastAt":"2008-08-15T00:18:16Z","messageCount":6,"participants":["Lee Marlow","Shawn O. Pearce","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"87260","messageId":"1218753671-58099-1-git-send-email-lee.marlow@gmail.com","threadId":"15014","inReplyTo":null,"subject":"[PATCH 0/2] Helpful completions for merging","fromName":"Lee Marlow","fromEmail":"lee.marlow@gmail.com","sentAt":"2008-08-14T22:41:09Z","receivedAt":"2008-08-14T22:41:09Z","isPatch":true,"sender":{"key":"lee.marlow@gmail.com","avatar":"https://gravatar.com/avatar/231170f3c8456cf1af984d30d09f35c5509b5f81494c81fa69dc7a1027473fc0?d=mp&s=160"},"body":"These patches just add some simple completions for merging.\n\nLee Marlow (2):\n  bash completion: Add completion for 'git mergetool'\n  bash completion: Add '--merge' long option for 'git log'\n\n contrib/completion/git-completion.bash |   21 +++++++++++++++++++++\n 1 files changed, 21 insertions(+), 0 deletions(-)\n"},{"id":"87259","messageId":"1218753671-58099-2-git-send-email-lee.marlow@gmail.com","threadId":"15014","inReplyTo":"1218753671-58099-1-git-send-email-lee.marlow@gmail.com","subject":"[PATCH 1/2] bash completion: Add completion for 'git mergetool'","fromName":"Lee Marlow","fromEmail":"lee.marlow@gmail.com","sentAt":"2008-08-14T22:41:10Z","receivedAt":"2008-08-14T22:41:10Z","isPatch":true,"sender":{"key":"lee.marlow@gmail.com","avatar":"https://gravatar.com/avatar/231170f3c8456cf1af984d30d09f35c5509b5f81494c81fa69dc7a1027473fc0?d=mp&s=160"},"body":"The --tool= long option can be completed with\n\tkdiff3 tkdiff meld xxdiff emerge\n\tvimdiff gvimdiff ecmerge opendiff\n\nSigned-off-by: Lee Marlow <lee.marlow@gmail.com>\n---\n contrib/completion/git-completion.bash |   20 ++++++++++++++++++++\n 1 files changed, 20 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 78189c1..4089670 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1001,6 +1001,25 @@ _git_merge ()\n \t__gitcomp \"$(__git_refs)\"\n }\n \n+_git_mergetool ()\n+{\n+\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n+\tcase \"$cur\" in\n+\t--tool=*)\n+\t\t__gitcomp \"\n+\t\t\tkdiff3 tkdiff meld xxdiff emerge\n+\t\t\tvimdiff gvimdiff ecmerge opendiff\n+\t\t\t\" \"\" \"${cur##--tool=}\"\n+\t\treturn\n+\t\t;;\n+\t--*)\n+\t\t__gitcomp \"--tool=\"\n+\t\treturn\n+\t\t;;\n+\tesac\n+\tCOMPREPLY=()\n+}\n+\n _git_merge_base ()\n {\n \t__gitcomp \"$(__git_refs)\"\n@@ -1650,6 +1669,7 @@ _git ()\n \tls-remote)   _git_ls_remote ;;\n \tls-tree)     _git_ls_tree ;;\n \tmerge)       _git_merge;;\n+\tmergetool)   _git_mergetool;;\n \tmerge-base)  _git_merge_base ;;\n \tmv)          _git_mv ;;\n \tname-rev)    _git_name_rev ;;\n-- \n1.6.0.rc3.6.ga0653\n"},{"id":"87261","messageId":"1218753671-58099-3-git-send-email-lee.marlow@gmail.com","threadId":"15014","inReplyTo":"1218753671-58099-2-git-send-email-lee.marlow@gmail.com","subject":"[PATCH 2/2] bash completion: Add '--merge' long option for 'git log'","fromName":"Lee Marlow","fromEmail":"lee.marlow@gmail.com","sentAt":"2008-08-14T22:41:11Z","receivedAt":"2008-08-14T22:41:11Z","isPatch":true,"sender":{"key":"lee.marlow@gmail.com","avatar":"https://gravatar.com/avatar/231170f3c8456cf1af984d30d09f35c5509b5f81494c81fa69dc7a1027473fc0?d=mp&s=160"},"body":"Signed-off-by: Lee Marlow <lee.marlow@gmail.com>\n---\n contrib/completion/git-completion.bash |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 4089670..bdf4f4a 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -972,6 +972,7 @@ _git_log ()\n \t\t\t--decorate --diff-filter=\n \t\t\t--color-words --walk-reflogs\n \t\t\t--parents --children --full-history\n+\t\t\t--merge\n \t\t\t\"\n \t\treturn\n \t\t;;\n-- \n1.6.0.rc3.6.ga0653\n"},{"id":"87276","messageId":"20080815000541.GE3782@spearce.org","threadId":"15014","inReplyTo":"1218753671-58099-2-git-send-email-lee.marlow@gmail.com","subject":"Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-08-15T00:05:41Z","receivedAt":"2008-08-15T00:05:41Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Lee Marlow <lee.marlow@gmail.com> wrote:\n> The --tool= long option can be completed with\n> \tkdiff3 tkdiff meld xxdiff emerge\n> \tvimdiff gvimdiff ecmerge opendiff\n> \n> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\n... for both patches in this series.  But this is new functionality\nso it probably won't be in 1.6.0; its too late in that release cycle.\n\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 78189c1..4089670 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1001,6 +1001,25 @@ _git_merge ()\n>  \t__gitcomp \"$(__git_refs)\"\n>  }\n>  \n> +_git_mergetool ()\n> +{\n> +\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n> +\tcase \"$cur\" in\n> +\t--tool=*)\n> +\t\t__gitcomp \"\n> +\t\t\tkdiff3 tkdiff meld xxdiff emerge\n> +\t\t\tvimdiff gvimdiff ecmerge opendiff\n> +\t\t\t\" \"\" \"${cur##--tool=}\"\n> +\t\treturn\n> +\t\t;;\n> +\t--*)\n> +\t\t__gitcomp \"--tool=\"\n> +\t\treturn\n> +\t\t;;\n> +\tesac\n> +\tCOMPREPLY=()\n> +}\n> +\n>  _git_merge_base ()\n>  {\n>  \t__gitcomp \"$(__git_refs)\"\n> @@ -1650,6 +1669,7 @@ _git ()\n>  \tls-remote)   _git_ls_remote ;;\n>  \tls-tree)     _git_ls_tree ;;\n>  \tmerge)       _git_merge;;\n> +\tmergetool)   _git_mergetool;;\n>  \tmerge-base)  _git_merge_base ;;\n>  \tmv)          _git_mv ;;\n>  \tname-rev)    _git_name_rev ;;\n\n-- \nShawn.\n"},{"id":"87279","messageId":"7v63q3cev5.fsf@gitster.siamese.dyndns.org","threadId":"15014","inReplyTo":"20080815000541.GE3782@spearce.org","subject":"Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-15T00:15:58Z","receivedAt":"2008-08-15T00:15:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Lee Marlow <lee.marlow@gmail.com> wrote:\n>> The --tool= long option can be completed with\n>> \tkdiff3 tkdiff meld xxdiff emerge\n>> \tvimdiff gvimdiff ecmerge opendiff\n>> \n>> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>\n>\n> Acked-by: Shawn O. Pearce <spearce@spearce.org>\n>\n> ... for both patches in this series.  But this is new functionality\n> so it probably won't be in 1.6.0; its too late in that release cycle.\n\nHeh, you are too cautious ;-)\n\nBoth \"log --merge\" and mergetool have been with us for quite some time,\nand I certainly do not mind taking [2/2] if not both.\n"},{"id":"87280","messageId":"20080815001816.GG3782@spearce.org","threadId":"15014","inReplyTo":"7v63q3cev5.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-08-15T00:18:16Z","receivedAt":"2008-08-15T00:18:16Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> \"Shawn O. Pearce\" <spearce@spearce.org> writes:\n> > Lee Marlow <lee.marlow@gmail.com> wrote:\n> >> The --tool= long option can be completed with\n> >> \tkdiff3 tkdiff meld xxdiff emerge\n> >> \tvimdiff gvimdiff ecmerge opendiff\n> >> \n> >> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>\n> >\n> > Acked-by: Shawn O. Pearce <spearce@spearce.org>\n> >\n> > ... for both patches in this series.  But this is new functionality\n> > so it probably won't be in 1.6.0; its too late in that release cycle.\n> \n> Heh, you are too cautious ;-)\n\nHeh, last time you accused me of being too aggressive.\n \n> Both \"log --merge\" and mergetool have been with us for quite some time,\n> and I certainly do not mind taking [2/2] if not both.\n\nI think both are fine to include in 1.6.0 if you are willing to\napply them there.  Its pretty low risk, but at this point the\nbash completion has gone from \"minor fun toy\" to \"major part of\nthe git-core suite which all of the distros link into their bash\ncompletion loading\".  IMHO its long out-grown its contrib status.\n\n-- \nShawn.\n"}]}