git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Julien Carsique <julien.carsique@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>,
	Simon Oosthoek <s.oosthoek@xs4all.nl>,
	"Eduardo R . D'Avila" <erdavila@gmail.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: Re: [PATCH] git-prompt.sh: show the upstream abbrev name
Date: Tue, 15 Oct 2013 14:21:11 +0200	[thread overview]
Message-ID: <20131015122111.GT19704@goldbirke> (raw)
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

      reply	other threads:[~2013-10-15 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 13:32 [PATCH] git-prompt.sh: show the upstream abbrev name Julien Carsique
2013-10-10 13:58 ` SZEDER Gábor
2013-10-10 14:40   ` Julien Carsique
2013-10-10 14:43   ` Julien Carsique
2013-10-15 12:21     ` SZEDER Gábor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131015122111.GT19704@goldbirke \
    --to=szeder@ira.uka.de \
    --cc=artagnon@gmail.com \
    --cc=erdavila@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=julien.carsique@gmail.com \
    --cc=s.oosthoek@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).