* [PATCH 0/2] Helpful completions for merging
@ 2008-08-14 22:41 Lee Marlow
2008-08-14 22:41 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Lee Marlow
0 siblings, 1 reply; 6+ messages in thread
From: Lee Marlow @ 2008-08-14 22:41 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Lee Marlow
These patches just add some simple completions for merging.
Lee Marlow (2):
bash completion: Add completion for 'git mergetool'
bash completion: Add '--merge' long option for 'git log'
contrib/completion/git-completion.bash | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] bash completion: Add completion for 'git mergetool'
2008-08-14 22:41 [PATCH 0/2] Helpful completions for merging Lee Marlow
@ 2008-08-14 22:41 ` Lee Marlow
2008-08-14 22:41 ` [PATCH 2/2] bash completion: Add '--merge' long option for 'git log' Lee Marlow
2008-08-15 0:05 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Shawn O. Pearce
0 siblings, 2 replies; 6+ messages in thread
From: Lee Marlow @ 2008-08-14 22:41 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Lee Marlow
The --tool= long option can be completed with
kdiff3 tkdiff meld xxdiff emerge
vimdiff gvimdiff ecmerge opendiff
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
---
contrib/completion/git-completion.bash | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 78189c1..4089670 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1001,6 +1001,25 @@ _git_merge ()
__gitcomp "$(__git_refs)"
}
+_git_mergetool ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --tool=*)
+ __gitcomp "
+ kdiff3 tkdiff meld xxdiff emerge
+ vimdiff gvimdiff ecmerge opendiff
+ " "" "${cur##--tool=}"
+ return
+ ;;
+ --*)
+ __gitcomp "--tool="
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_merge_base ()
{
__gitcomp "$(__git_refs)"
@@ -1650,6 +1669,7 @@ _git ()
ls-remote) _git_ls_remote ;;
ls-tree) _git_ls_tree ;;
merge) _git_merge;;
+ mergetool) _git_mergetool;;
merge-base) _git_merge_base ;;
mv) _git_mv ;;
name-rev) _git_name_rev ;;
--
1.6.0.rc3.6.ga0653
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] bash completion: Add '--merge' long option for 'git log'
2008-08-14 22:41 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Lee Marlow
@ 2008-08-14 22:41 ` Lee Marlow
2008-08-15 0:05 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Shawn O. Pearce
1 sibling, 0 replies; 6+ messages in thread
From: Lee Marlow @ 2008-08-14 22:41 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Lee Marlow
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
---
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4089670..bdf4f4a 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -972,6 +972,7 @@ _git_log ()
--decorate --diff-filter=
--color-words --walk-reflogs
--parents --children --full-history
+ --merge
"
return
;;
--
1.6.0.rc3.6.ga0653
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'
2008-08-14 22:41 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Lee Marlow
2008-08-14 22:41 ` [PATCH 2/2] bash completion: Add '--merge' long option for 'git log' Lee Marlow
@ 2008-08-15 0:05 ` Shawn O. Pearce
2008-08-15 0:15 ` Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Shawn O. Pearce @ 2008-08-15 0:05 UTC (permalink / raw)
To: Lee Marlow; +Cc: git
Lee Marlow <lee.marlow@gmail.com> wrote:
> The --tool= long option can be completed with
> kdiff3 tkdiff meld xxdiff emerge
> vimdiff gvimdiff ecmerge opendiff
>
> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
... for both patches in this series. But this is new functionality
so it probably won't be in 1.6.0; its too late in that release cycle.
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 78189c1..4089670 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1001,6 +1001,25 @@ _git_merge ()
> __gitcomp "$(__git_refs)"
> }
>
> +_git_mergetool ()
> +{
> + local cur="${COMP_WORDS[COMP_CWORD]}"
> + case "$cur" in
> + --tool=*)
> + __gitcomp "
> + kdiff3 tkdiff meld xxdiff emerge
> + vimdiff gvimdiff ecmerge opendiff
> + " "" "${cur##--tool=}"
> + return
> + ;;
> + --*)
> + __gitcomp "--tool="
> + return
> + ;;
> + esac
> + COMPREPLY=()
> +}
> +
> _git_merge_base ()
> {
> __gitcomp "$(__git_refs)"
> @@ -1650,6 +1669,7 @@ _git ()
> ls-remote) _git_ls_remote ;;
> ls-tree) _git_ls_tree ;;
> merge) _git_merge;;
> + mergetool) _git_mergetool;;
> merge-base) _git_merge_base ;;
> mv) _git_mv ;;
> name-rev) _git_name_rev ;;
--
Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'
2008-08-15 0:05 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Shawn O. Pearce
@ 2008-08-15 0:15 ` Junio C Hamano
2008-08-15 0:18 ` Shawn O. Pearce
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2008-08-15 0:15 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Lee Marlow, git
"Shawn O. Pearce" <spearce@spearce.org> writes:
> Lee Marlow <lee.marlow@gmail.com> wrote:
>> The --tool= long option can be completed with
>> kdiff3 tkdiff meld xxdiff emerge
>> vimdiff gvimdiff ecmerge opendiff
>>
>> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>
>
> ... for both patches in this series. But this is new functionality
> so it probably won't be in 1.6.0; its too late in that release cycle.
Heh, you are too cautious ;-)
Both "log --merge" and mergetool have been with us for quite some time,
and I certainly do not mind taking [2/2] if not both.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash completion: Add completion for 'git mergetool'
2008-08-15 0:15 ` Junio C Hamano
@ 2008-08-15 0:18 ` Shawn O. Pearce
0 siblings, 0 replies; 6+ messages in thread
From: Shawn O. Pearce @ 2008-08-15 0:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Lee Marlow, git
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> > Lee Marlow <lee.marlow@gmail.com> wrote:
> >> The --tool= long option can be completed with
> >> kdiff3 tkdiff meld xxdiff emerge
> >> vimdiff gvimdiff ecmerge opendiff
> >>
> >> Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
> >
> > Acked-by: Shawn O. Pearce <spearce@spearce.org>
> >
> > ... for both patches in this series. But this is new functionality
> > so it probably won't be in 1.6.0; its too late in that release cycle.
>
> Heh, you are too cautious ;-)
Heh, last time you accused me of being too aggressive.
> Both "log --merge" and mergetool have been with us for quite some time,
> and I certainly do not mind taking [2/2] if not both.
I think both are fine to include in 1.6.0 if you are willing to
apply them there. Its pretty low risk, but at this point the
bash completion has gone from "minor fun toy" to "major part of
the git-core suite which all of the distros link into their bash
completion loading". IMHO its long out-grown its contrib status.
--
Shawn.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-15 0:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14 22:41 [PATCH 0/2] Helpful completions for merging Lee Marlow
2008-08-14 22:41 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Lee Marlow
2008-08-14 22:41 ` [PATCH 2/2] bash completion: Add '--merge' long option for 'git log' Lee Marlow
2008-08-15 0:05 ` [PATCH 1/2] bash completion: Add completion for 'git mergetool' Shawn O. Pearce
2008-08-15 0:15 ` Junio C Hamano
2008-08-15 0:18 ` Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).