From: Ted Pavlic Date: Wed, 11 Feb 2009 15:37:11 GMT Subject: [PATCH 0/3] completion: Convention updates and DIRTYSTATE fix Message-ID: <1234366634-17900-1-git-send-email-ted@tedpavlic.com> Three more patches to git's bash completion script. The first two are non-critical: * The first patch changes two "git rev-parse" calls to "__gitdir" to match the convention used in the rest of the script. * The second patch changes "[...]" to "test ..." to match git convention. In the one case of "[...] || [...]", a "test || test" call is used. Alternatively, a "test ... -o ..." call could be used, but that might not be as readable. The third fixes an ugly error in the new GIT_PS1_DIRTYSTATE. In order to determine whether the branch name needs a "*" following it, the DIRTYSTATE implementation uses a "git diff." Because "git diff" is illegal when not in a working tree, this command gives an ugly error when changing directory to ".git". This patch detects this case and sets "--work-tree=..". Is there a better fix? Ted Pavlic (3): completion: For consistency, changed "git rev-parse" to __gitdir calls. completion: Change "if [...]" to "if test ..." to match git convention completion: Prevents GIT_PS1_DIRTYSTATE from breaking when CWD is .git contrib/completion/git-completion.bash | 101 +++++++++++++++----------------- 1 files changed, 48 insertions(+), 53 deletions(-)