* [PATCH 5/5] bash: refactor 'git log --pretty=<format>' options
@ 2009-01-16 16:02 SZEDER Gábor
2009-01-16 17:18 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: SZEDER Gábor @ 2009-01-16 16:02 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, SZEDER Gábor
Both 'git log' and 'show' have the same '--pretty=<format>' option
with the same formats. So refactor these formats into a common
variable.
While at it, also add 'format:' to the list.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
contrib/completion/git-completion.bash | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3a26d2b..b5b40c2 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -947,6 +947,8 @@ _git_ls_tree ()
__git_complete_file
}
+__git_log_pretty_formats="oneline short medium full fuller email raw format:"
+
_git_log ()
{
__git_has_doubledash && return
@@ -954,8 +956,7 @@ _git_log ()
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--pretty=*)
- __gitcomp "
- oneline short medium full fuller email raw
+ __gitcomp "$__git_log_pretty_formats
" "" "${cur##--pretty=}"
return
;;
@@ -1487,8 +1488,7 @@ _git_show ()
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--pretty=*)
- __gitcomp "
- oneline short medium full fuller email raw
+ __gitcomp "$__git_log_pretty_formats
" "" "${cur##--pretty=}"
return
;;
--
1.6.1.198.geb475f
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5/5] bash: refactor 'git log --pretty=<format>' options
2009-01-16 16:02 [PATCH 5/5] bash: refactor 'git log --pretty=<format>' options SZEDER Gábor
@ 2009-01-16 17:18 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2009-01-16 17:18 UTC (permalink / raw)
To: SZEDER Gábor, Junio C Hamano; +Cc: git
SZEDER Gábor <szeder@ira.uka.de> wrote:
> Both 'git log' and 'show' have the same '--pretty=<format>' option
> with the same formats. So refactor these formats into a common
> variable.
>
> While at it, also add 'format:' to the list.
>
> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
For all 3 patches in the series:
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Thanks.
--
Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-16 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 16:02 [PATCH 5/5] bash: refactor 'git log --pretty=<format>' options SZEDER Gábor
2009-01-16 17: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).