mirror of
https://github.com/git/git.git
synced 2024-10-31 14:27:54 +01:00
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>
This commit is contained in:
parent
1b53a076fc
commit
fa26a401be
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ __gitdir ()
|
||||||
# returns text to add to bash PS1 prompt (includes branch name)
|
# returns text to add to bash PS1 prompt (includes branch name)
|
||||||
__git_ps1 ()
|
__git_ps1 ()
|
||||||
{
|
{
|
||||||
local g="$(git rev-parse --git-dir 2>/dev/null)"
|
local g="$(__gitdir)"
|
||||||
if [ -n "$g" ]; then
|
if [ -n "$g" ]; then
|
||||||
local r
|
local r
|
||||||
local b
|
local b
|
||||||
|
@ -1797,7 +1797,7 @@ _gitk ()
|
||||||
__git_has_doubledash && return
|
__git_has_doubledash && return
|
||||||
|
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
local g="$(git rev-parse --git-dir 2>/dev/null)"
|
local g="$(__gitdir)"
|
||||||
local merge=""
|
local merge=""
|
||||||
if [ -f $g/MERGE_HEAD ]; then
|
if [ -f $g/MERGE_HEAD ]; then
|
||||||
merge="--merge"
|
merge="--merge"
|
||||||
|
|
Loading…
Reference in a new issue