Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
contrib: completion: fix 'eread()' namespace
author
Felipe Contreras
<felipe.contreras@gmail.com>
Tue, 13 May 2014 13:21:19 +0000
(08:21 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 13 May 2014 18:52:51 +0000
(11:52 -0700)
Otherwise it might collide with a function of the same name in the
user's environment.
Suggested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-prompt.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
59d3924
)
diff --git
a/contrib/completion/git-prompt.sh
b/contrib/completion/git-prompt.sh
index 54489080f8ae25a4483cd4bae076942f47f53031..dc7d9b1794622de47becbacad9a1b5184cf6d57a 100644
(file)
--- a/
contrib/completion/git-prompt.sh
+++ b/
contrib/completion/git-prompt.sh
@@
-259,7
+259,7
@@
__git_ps1_colorize_gitstring ()
r="$c_clear$r"
}
r="$c_clear$r"
}
-eread ()
+
__git_
eread ()
{
f="$1"
shift
{
f="$1"
shift
@@
-328,9
+328,9
@@
__git_ps1 ()
local step=""
local total=""
if [ -d "$g/rebase-merge" ]; then
local step=""
local total=""
if [ -d "$g/rebase-merge" ]; then
- eread "$g/rebase-merge/head-name" b
- eread "$g/rebase-merge/msgnum" step
- eread "$g/rebase-merge/end" total
+
__git_
eread "$g/rebase-merge/head-name" b
+
__git_
eread "$g/rebase-merge/msgnum" step
+
__git_
eread "$g/rebase-merge/end" total
if [ -f "$g/rebase-merge/interactive" ]; then
r="|REBASE-i"
else
if [ -f "$g/rebase-merge/interactive" ]; then
r="|REBASE-i"
else
@@
-338,10
+338,10
@@
__git_ps1 ()
fi
else
if [ -d "$g/rebase-apply" ]; then
fi
else
if [ -d "$g/rebase-apply" ]; then
- eread "$g/rebase-apply/next" step
- eread "$g/rebase-apply/last" total
+
__git_
eread "$g/rebase-apply/next" step
+
__git_
eread "$g/rebase-apply/last" total
if [ -f "$g/rebase-apply/rebasing" ]; then
if [ -f "$g/rebase-apply/rebasing" ]; then
- eread "$g/rebase-apply/head-name" b
+
__git_
eread "$g/rebase-apply/head-name" b
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
@@
-365,7
+365,7
@@
__git_ps1 ()
b="$(git symbolic-ref HEAD 2>/dev/null)"
else
local head=""
b="$(git symbolic-ref HEAD 2>/dev/null)"
else
local head=""
- if ! eread "$g/HEAD" head; then
+ if !
__git_
eread "$g/HEAD" head; then
if [ $pcmode = yes ]; then
PS1="$ps1pc_start$ps1pc_end"
fi
if [ $pcmode = yes ]; then
PS1="$ps1pc_start$ps1pc_end"
fi