Skip to content

Commit

Permalink
completion: For consistency, change "git rev-parse" to __gitdir calls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ted Pavlic authored and Junio C Hamano committed Feb 11, 2009
1 parent 1b53a07 commit fa26a40
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 @@ -80,7 +80,7 @@ __gitdir ()
# returns text to add to bash PS1 prompt (includes branch name)
__git_ps1 ()
{
local g="$(git rev-parse --git-dir 2>/dev/null)"
local g="$(__gitdir)"
if [ -n "$g" ]; then
local r
local b
Expand Down Expand Up @@ -1797,7 +1797,7 @@ _gitk ()
__git_has_doubledash && return

local cur="${COMP_WORDS[COMP_CWORD]}"
local g="$(git rev-parse --git-dir 2>/dev/null)"
local g="$(__gitdir)"
local merge=""
if [ -f $g/MERGE_HEAD ]; then
merge="--merge"
Expand Down

0 comments on commit fa26a40

Please sign in to comment.