From: SZEDER Gábor Date: Thu, 6 Mar 2008 21:37:36 +0000 (+0100) Subject: bash: use __gitdir when completing 'git rebase' options X-Git-Tag: v1.5.5-rc0~32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=51fe120903370ca8bf384c839c8cfb70ee563eb0;p=git.git 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 Signed-off-by: Shawn O. Pearce --- 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