Skip to content

Commit

Permalink
bash: use __gitdir when completing 'git rebase' options
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SZEDER Gábor authored and Shawn O. Pearce committed Mar 10, 2008
1 parent 6753f2a commit 51fe120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51fe120

Please sign in to comment.