@matheusbsbs / matheus-bagliano / commits / fa26a401be
Fork 0

completion: For consistency, change "git rev-parse" to __gitdir calls

Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ted Pavlic committed Feb 11, 2009 at 13:03 UTC fa26a401bed5967d6118ac430c5c5f4707c54386
1 file changed +2 -2
contrib/completion/git-completion.bash
+2 -2
@@ -80,7 +80,7 @@ __gitdir ()
80 # returns text to add to bash PS1 prompt (includes branch name)
81 __git_ps1 ()
82 {
83 - local g="$(git rev-parse --git-dir 2>/dev/null)"
83 + local g="$(__gitdir)"
84 if [ -n "$g" ]; then
85 local r
86 local b
@@ -1797,7 +1797,7 @@ _gitk ()
1797 __git_has_doubledash && return
1798
1799 local cur="${COMP_WORDS[COMP_CWORD]}"
1800 - local g="$(git rev-parse --git-dir 2>/dev/null)"
1800 + local g="$(__gitdir)"
1801 local merge=""
1802 if [ -f $g/MERGE_HEAD ]; then
1803 merge="--merge"