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

Re: [PATCH v2] status: add color config slots for branch info in "--short --branch"

From
Jeff King <peff@peff.net>
Date
Apr 27, 2017, 09:04 UTC
Message-ID
<20170427090423.amjqi7ca4xl7pzax@sigill.intra.peff.net>
In-Reply-To
<201704939828871.4296cfa6a746a5004d28db265800a@localhost>
On Fri, Apr 21, 2017 at 10:42:02PM -0700, Stephen Kent wrote:
> Add color config slots to be used in the status short-format when
> displaying local and remote tracking branch information.
> 
> Signed-off-by: Stephen Kent <smkent@smkent.net>
This looks good to me, and I'd be happy if we took it as-is.
But...
Show 20 quoted lines
> diff --git a/t/t7508-status.sh b/t/t7508-status.sh
> index fb00e6d..7d42085 100755
> --- a/t/t7508-status.sh
> +++ b/t/t7508-status.sh
> @@ -610,7 +610,8 @@ test_expect_success 'status --porcelain ignores relative paths setting' '
>  test_expect_success 'setup unique colors' '
>  
>  	git config status.color.untracked blue &&
> -	git config status.color.branch green
> +	git config status.color.branch green &&
> +	git config status.color.localBranch yellow
>  
>  '
>  
> @@ -675,7 +676,7 @@ test_expect_success 'status -s with color.status' '
>  '
>  
>  cat >expect <<\EOF
> -## <GREEN>master<RESET>
> +## <YELLOW>master<RESET>

As we discussed elsewhere, it would be nice if this tested remoteBranch, too. IMHO the simplest thing to is to rebase it on the t7508 update I just posted.

The other option is to add config for remoteBranch which would do nothing for now, and then resolve it to check the correct colors when the two topics are merged (since the test will start failing then). That seems unnecessarily confusing.

-Peff
Previous: Stephen KentNext: Junio C Hamano
Message 2 of 4 in “status: add color config slots for branch info in "--short --branch"”
  1. status: add color config slots for branch info in "--short --branch"Stephen Kent, Apr 22, 2017
  2. Jeff KingApr 27, 2017
  3. Junio C HamanoApr 28, 2017
  4. Jeff KingApr 28, 2017

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.