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_UPDATEDbut 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_UPDATEDand 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.