Re: [PATCH] git-prompt.sh: show the upstream abbrev name
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Oct 15, 2013, 12:21 UTC
- Message-ID
- <20131015122111.GT19704@goldbirke>
- In-Reply-To
- <5256BD0A.30706@gmail.com>
On Thu, Oct 10, 2013 at 04:43:22PM +0200, Julien Carsique wrote:
> It's fixed.
Thanks, the updated patch looks good to me.
> Note '+=' was already used line 114: > > svn_url_pattern+="\\|$value"
I guess noone has tried to use the upstream status indicator with an SVN upstream and an ancient Bash version yet, thanks for pointing it out.
-- >8 -- Subject: [PATCH] bash prompt: don't use '+=' operator in show upstream code path
The '+=' operator is not supported by old Bash versions (3.0) we still care about.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> --- contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 202e2e520f..7b732d2aeb 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -111,7 +111,7 @@ __git_ps1_show_upstream () ;; svn-remote.*.url) svn_remote[$((${#svn_remote[@]} + 1))]="$value" - svn_url_pattern+="\\|$value" + svn_url_pattern="$svn_url_pattern\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; esac
-- 1.8.4.1.495.gd8d272e