{"thread":{"id":"12550","subject":"[PATCH] bash: use __gitdir when completing 'git rebase' options","startedAt":"2008-03-06T21:37:36Z","lastAt":"2008-03-06T21:37:36Z","messageCount":1,"participants":["SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"71281","messageId":"1204839456-23566-1-git-send-email-szeder@ira.uka.de","threadId":"12550","inReplyTo":null,"subject":"[PATCH] bash: use __gitdir when completing 'git rebase' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-03-06T21:37:36Z","receivedAt":"2008-03-06T21:37:36Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"When doing completion of rebase options in a subdirectory of the work\ntree during an ongoing rebase, wrong options were offered because of the\nhardcoded .git/.dotest-merge path.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 49e6df0..aee9125 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -828,8 +828,8 @@ _git_push ()\n \n _git_rebase ()\n {\n-\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n-\tif [ -d .dotest ] || [ -d .git/.dotest-merge ]; then\n+\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\" dir=\"$(__gitdir)\"\n+\tif [ -d .dotest ] || [ -d \"$dir\"/.dotest-merge ]; then\n \t\t__gitcomp \"--continue --skip --abort\"\n \t\treturn\n \tfi\n-- \n1.5.4.3\n\n"}]}