Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-26 Thread Karthik Nayak
On Wed, Aug 26, 2015 at 12:20 AM, Junio C Hamano gits...@pobox.com wrote: Karthik Nayak karthik@gmail.com writes: I'm working on porting over the printing options of ref-filter to `git branch -l`. This is a follow up to http://article.gmane.org/gmane.comp.version-control.git/276377

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-26 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: It's more than just colors. The whole format changes. $ git branch -a For local: %(if)%(HEAD)%(then)%(HEAD) %(color:green)%(refname:short)%(else) %(refname:short)%(end) For remote:

[RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-25 Thread Karthik Nayak
I'm working on porting over the printing options of ref-filter to `git branch -l`. This is a follow up to http://article.gmane.org/gmane.comp.version-control.git/276377 Theres a slight issue with this which I'd like to discuss about. When we use `-a` option in `git branch -l` It lists local

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-25 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: I'm working on porting over the printing options of ref-filter to `git branch -l`. This is a follow up to http://article.gmane.org/gmane.comp.version-control.git/276377 Theres a slight issue with this which I'd like to discuss about. When we use

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-25 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: A less ambitious option might be: 3. Invent %(refname:some magic) format similar to %(refname:short) but does your thing depending on the prefix refs/heads/ and refs/remotes/. Actually, this is the option I suggest offline. but that

Re: [RFC] Porting builtin/branch.c to use the printing options of ref-filter.{c,h}

2015-08-25 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Hmm, yes, colors would be difficult to get with this solution. Perhaps a %(refname:autoprefix,autocolor) that would pick the color and do the textual rendering? Yeah, that's workable. -- To unsubscribe from this list: send the line unsubscribe