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

Re: [PATCH] There was a little inconsistancy in git prompt

From
Todd Zullinger <tmz@pobox.com>
Date
Apr 12, 2016, 15:27 UTC
Message-ID
<20160412152739.GL15513@zaya.teonanacatl.net>
In-Reply-To
<01020154095436db-40246224-5586-4e95-b5f7-59b27928ffa8-000000@eu-west-1.amazonses.com>
Hi Rudy,

I think the commit subject should include a bit more detail. Ideally, the subject would start with 'bash prompt: ' to make it clear what area the commit involves. Then you would want to describe what inconsistency is being fixed (and why).

Rudy YAYON wrote:
Show 26 quoted lines
> ---
> contrib/completion/git-prompt.sh | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
> index 07b52be..18be99f 100644
> --- a/contrib/completion/git-prompt.sh
> +++ b/contrib/completion/git-prompt.sh
> @@ -194,13 +194,13 @@ __git_ps1_show_upstream ()
> 		"") # no upstream
> 			p="" ;;
> 		"0	0") # equal to upstream
> -			p="=" ;;
> +			p=" =" ;;
> 		"0	"*) # ahead of upstream
> -			p=">" ;;
> +			p=" >" ;;
> 		*"	0") # behind upstream
> -			p="<" ;;
> +			p=" <" ;;
> 		*)	    # diverged from upstream
> -			p="<>" ;;
> +			p=" <>" ;;
> 		esac
> 	else
> 		case "$count" in

I attempted to solve this a while back (longer than I realized, now that I found the previous thread):

http://thread.gmane.org/gmane.comp.version-control.git/169330

Junio had some comments and suggestions, which I lacked time to follow up on, it appears. (I thought there was more discussion but it must have all been in my head. ;)

-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I think about all the crap I learned in high school ... it's a
wonder I can think at all.
    -- Paul Simon
Previous: Rudy YAYON
Message 2 of 2 in “There was a little inconsistancy in git prompt”
  1. There was a little inconsistancy in git promptRudy YAYON, Apr 12, 2016
  2. Todd ZullingerApr 12, 2016

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.