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

Re: [PATCH] status: allow branch info color customization

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2013, 21:39 UTC
Message-ID
<xmqqzjq851zk.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1381911773-9564-1-git-send-email-1zeeky@gmail.com>
Alexander 'z33ky' Hirsch <1zeeky@gmail.com> writes:
> From: Alexander Hirsch <1zeeky@gmail.com>
>
> git status -bs (--branch --short) does not seem to allow customization of the
> colors for the local and remote branch.
wt-status can use the following colors:
    WT_STATUS_CHANGED
    WT_STATUS_HEADER
  - WT_STATUS_LOCAL_BRANCH
    WT_STATUS_NOBRANCH
    WT_STATUS_ONBRANCH
  - WT_STATUS_REMOTE_BRANCH
    WT_STATUS_UNMERGED
    WT_STATUS_UNTRACKED
    WT_STATUS_UPDATED
but parse_status_slot() lets you set only these
    WT_STATUS_CHANGED
    WT_STATUS_HEADER
    WT_STATUS_NOBRANCH
    WT_STATUS_ONBRANCH
    WT_STATUS_UNMERGED
    WT_STATUS_UNTRACKED
    WT_STATUS_UPDATED

and this patch makes the configuration mechanism cover all of the slots by adding parsing code for the missing two.

While I think the intent of the patch makes sense, I have to wonder if "local" and "remote" without having the "branch" anywhere is painting us into an unpleasant corner we cannot later get out of. For example, we might want to show the remote-tracking branch information (that is where REMOTE_BRANCH color matters in the current code) in a more detailed way later, which may include where the source repository resides, either locally on the same host or remotely over the network, and WT_STATUS_{LOCAL,REMOTE}_REPOSITORY may be the natural names for the colors to paint the repository paths/URL in.

Previous: Alexander 'z33ky' Hirsch
Message 2 of 2 in “status: allow branch info color customization”
  1. status: allow branch info color customizationAlexander 'z33ky' Hirsch, Oct 16, 2013
  2. Junio C HamanoOct 16, 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.