* [PATCH] bash: gitk accepts common log-shortlog options
@ 2009-07-21 22:20 SZEDER Gábor
2009-07-21 22:36 ` Thomas Rast
0 siblings, 1 reply; 3+ messages in thread
From: SZEDER Gábor @ 2009-07-21 22:20 UTC (permalink / raw)
To: git; +Cc: Shawn O. Pearce, Thomas Rast, SZEDER Gábor
Commit a393777e (bash completion: refactor common log, shortlog and gitk
options, 2009-02-16) introduced a list of command line options that go
well with 'git log' and 'git shortlog' but not with gitk. However,
these options are all 'git rev-list' options, and, therefore, are
accepted by gitk, too.
This patch moves these options to the list of common options, making
them available for gitk option completion, too. Since the list of
log-shortlog options becomes empty with this move, this patch deletes
it.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
contrib/completion/git-completion.bash | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index bc2d8b4..f0cd5e3 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1118,6 +1118,8 @@ __git_log_common_options="
--max-count=
--max-age= --since= --after=
--min-age= --until= --before=
+ --author= --committer= --grep=
+ --all-match
"
# Options that go well for log and gitk (not shortlog)
__git_log_gitk_options="
@@ -1125,11 +1127,6 @@ __git_log_gitk_options="
--simplify-merges --simplify-by-decoration
--left-right
"
-# Options that go well for log and shortlog (not gitk)
-__git_log_shortlog_options="
- --author= --committer= --grep=
- --all-match
-"
__git_log_pretty_formats="oneline short medium full fuller email raw format:"
__git_log_date_formats="relative iso8601 rfc2822 short local default raw"
@@ -1162,7 +1159,6 @@ _git_log ()
--*)
__gitcomp "
$__git_log_common_options
- $__git_log_shortlog_options
$__git_log_gitk_options
--root --topo-order --date-order --reverse
--follow --full-diff
@@ -1822,7 +1818,6 @@ _git_shortlog ()
--*)
__gitcomp "
$__git_log_common_options
- $__git_log_shortlog_options
--numbered --summary
"
return
--
1.6.4.rc1.73.ga0daf
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bash: gitk accepts common log-shortlog options
2009-07-21 22:20 [PATCH] bash: gitk accepts common log-shortlog options SZEDER Gábor
@ 2009-07-21 22:36 ` Thomas Rast
2009-07-22 14:05 ` SZEDER Gábor
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rast @ 2009-07-21 22:36 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: git, Shawn O. Pearce
[-- Attachment #1: Type: Text/Plain, Size: 750 bytes --]
SZEDER Gábor wrote:
> Commit a393777e (bash completion: refactor common log, shortlog and gitk
> options, 2009-02-16) introduced a list of command line options that go
> well with 'git log' and 'git shortlog' but not with gitk. However,
> these options are all 'git rev-list' options, and, therefore, are
> accepted by gitk, too.
[...]
> + --author= --committer= --grep=
> + --all-match
At the time, I tried to skip options to gitk that disconnect history
in places where it really is connected. This applies to --author,
--committer and --grep, which also have a GUI equivalent. However,
--all-match doesn't, and then the other three are also needed, so I
guess this makes sense.
--
Thomas Rast
trast@{inf,student}.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bash: gitk accepts common log-shortlog options
2009-07-21 22:36 ` Thomas Rast
@ 2009-07-22 14:05 ` SZEDER Gábor
0 siblings, 0 replies; 3+ messages in thread
From: SZEDER Gábor @ 2009-07-22 14:05 UTC (permalink / raw)
To: Thomas Rast; +Cc: git, Shawn O. Pearce
On Wed, Jul 22, 2009 at 12:36:36AM +0200, Thomas Rast wrote:
> SZEDER Gábor wrote:
> > Commit a393777e (bash completion: refactor common log, shortlog and gitk
> > options, 2009-02-16) introduced a list of command line options that go
> > well with 'git log' and 'git shortlog' but not with gitk. However,
> > these options are all 'git rev-list' options, and, therefore, are
> > accepted by gitk, too.
> [...]
> > + --author= --committer= --grep=
> > + --all-match
>
> At the time, I tried to skip options to gitk that disconnect history
> in places where it really is connected. This applies to --author,
> --committer and --grep, which also have a GUI equivalent. However,
> --all-match doesn't, and then the other three are also needed, so I
> guess this makes sense.
I see. I was not sure what you meant by "go well", but suspected
this. However, the '--no-merges' option was already there earlier,
and it also produces disconnected history. I'm not sure how often
these options are used with gitk, but it just happened yesterday that
I wanted to use 'gitk --author=<me> ...' to find one of my commits.
Best,
Gábor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-22 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 22:20 [PATCH] bash: gitk accepts common log-shortlog options SZEDER Gábor
2009-07-21 22:36 ` Thomas Rast
2009-07-22 14:05 ` SZEDER Gábor
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).