git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-prompt.sh: show the upstream abbrev name

From
Julien Carsique <julien.carsique@gmail.com>
Date
Oct 10, 2013, 14:43 UTC
Message-ID
<5256BD0A.30706@gmail.com>
In-Reply-To
<20131010135813.GF19704@goldbirke>
On 10/10/2013 15:58, SZEDER Gábor wrote:
Show 15 quoted lines
> Hi,
>
> On Thu, Oct 10, 2013 at 03:32:13PM +0200, Julien Carsique wrote:
>> @@ -204,6 +206,9 @@ __git_ps1_show_upstream ()
>>  		*)	    # diverged from upstream
>>  			p=" u+${count#*	}-${count%	*}" ;;
>>  		esac
>> +		if [[ -n "$count" && -n "$name" ]]; then
>> +			p+=" $(git rev-parse --abbrev-ref "$upstream" 2>/dev/null)"
> The '+=' operator is not supported in all Bash versions we care about.
> Please write this as p="$p $(...)".
>
> Thanks,
> Gábor
>
Hi,
It's fixed.
Note '+=' was already used line 114:
            svn_url_pattern+="\\|$value"
Thank you for the review,
Previous: Julien CarsiqueNext: SZEDER Gábor
Message 4 of 5 in “git-prompt.sh: show the upstream abbrev name”
  1. git-prompt.sh: show the upstream abbrev nameJulien Carsique, Oct 10, 2013
  2. SZEDER GáborOct 10, 2013
  3. git-prompt.sh: show the upstream abbrev nameJulien Carsique, Oct 10, 2013
  4. Julien CarsiqueOct 10, 2013
  5. SZEDER GáborOct 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.