bash: use __gitdir when completing 'git rebase' options
[gitweb.git] / contrib / completion / git-completion.bash
index 2c4bf4e1d22d8af7c99ddde6f1b857cf36b5b957..fc108e48288874dcaa3e2943dd7cca16ae453697 100755 (executable)
@@ -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
@@ -961,7 +961,6 @@ _git_config ()
                core.sharedRepository
                core.warnAmbiguousRefs
                core.compression
-               core.legacyHeaders
                core.packedGitWindowSize
                core.packedGitLimit
                clean.requireForce