aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2008-03-06 22:37:36 +0100
committerShawn O. Pearce <spearce@spearce.org>2008-03-10 19:55:07 -0400
commit51fe120903370ca8bf384c839c8cfb70ee563eb0 (patch)
treea929279e30c6fa287167e4b24537e80156ccd4b3 /contrib
parent6753f2aa55280a0fef1cbdcee71c1b529cb0c910 (diff)
downloadgit-51fe120903370ca8bf384c839c8cfb70ee563eb0.tar.gz
git-51fe120903370ca8bf384c839c8cfb70ee563eb0.tar.xz
bash: use __gitdir when completing 'git rebase' options
When doing completion of rebase options in a subdirectory of the work tree during an ongoing rebase, wrong options were offered because of the hardcoded .git/.dotest-merge path. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 73ed09548..fc108e482 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -841,8 +841,8 @@ _git_push ()
_git_rebase ()
{
- local cur="${COMP_WORDS[COMP_CWORD]}"
- if [ -d .dotest ] || [ -d .git/.dotest-merge ]; then
+ local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)"
+ if [ -d .dotest ] || [ -d "$dir"/.dotest-merge ]; then
__gitcomp "--continue --skip --abort"
return
fi