* [PATCH] bash: offer refs instead of filenames for 'git revert'
@ 2008-11-27 13:35 SZEDER Gábor
2008-11-27 21:30 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: SZEDER Gábor @ 2008-11-27 13:35 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, SZEDER Gábor
The completion script for 'git revert' currently offers options and
filenames. However, 'git revert' doesn't take any filenames from the
command line, but a single commit. Therefore, it's more sane to offer
refs instead.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
contrib/completion/git-completion.bash | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 39bf18b..7e668d5 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1348,7 +1348,7 @@ _git_revert ()
return
;;
esac
- COMPREPLY=()
+ __gitcomp "$(__git_refs)"
}
_git_rm ()
--
1.6.0.4.814.gfe502
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bash: offer refs instead of filenames for 'git revert'
2008-11-27 13:35 [PATCH] bash: offer refs instead of filenames for 'git revert' SZEDER Gábor
@ 2008-11-27 21:30 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2008-11-27 21:30 UTC (permalink / raw)
To: SZEDER GGGbor; +Cc: git
SZEDER GGGbor <szeder@ira.uka.de> wrote:
> The completion script for 'git revert' currently offers options and
> filenames. However, 'git revert' doesn't take any filenames from the
> command line, but a single commit. Therefore, it's more sane to offer
> refs instead.
>
> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Oh, good catch.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
> ---
> contrib/completion/git-completion.bash | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 39bf18b..7e668d5 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1348,7 +1348,7 @@ _git_revert ()
> return
> ;;
> esac
> - COMPREPLY=()
> + __gitcomp "$(__git_refs)"
> }
>
> _git_rm ()
> --
> 1.6.0.4.814.gfe502
>
--
Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-27 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27 13:35 [PATCH] bash: offer refs instead of filenames for 'git revert' SZEDER Gábor
2008-11-27 21:30 ` Shawn O. Pearce
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.