summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2008-03-06 21:37:36 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-03-10 23:55:07 (GMT)
commit51fe120903370ca8bf384c839c8cfb70ee563eb0 (patch)
treea929279e30c6fa287167e4b24537e80156ccd4b3
parent6753f2aa55280a0fef1cbdcee71c1b529cb0c910 (diff)
downloadgit-51fe120903370ca8bf384c839c8cfb70ee563eb0.zip
git-51fe120903370ca8bf384c839c8cfb70ee563eb0.tar.gz
git-51fe120903370ca8bf384c839c8cfb70ee563eb0.tar.bz2
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>
-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 73ed095..fc108e4 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