Re: [PATCH 0/5] RFC: patterns for branch list
- From
Jeff King <peff@peff.net>
- Date
- Sep 7, 2011, 19:53 UTC
- Message-ID
- <20110907195319.GC13364@sigill.intra.peff.net>
- In-Reply-To
- <7vwre0dsdy.fsf@alter.siamese.dyndns.org>
On Fri, Aug 26, 2011 at 09:55:37AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> As we use fnmatch() and not match_pathspec() for this pattern matching, > "git branch peff/" will not list all the topics under the peff/ hierarchy > (your example "git branch peff/\*" would be the way), but I would imagine > that we may someday want to update it to allow the leading path match > here. And at that point, distinction between > > git branch peff ;# to create a "peff" branch > git branch peff/ ;# to list "peff/" branches, as "peff/" itself is > ;# an invalid branch name and your auto listing > ;# heuristic kicks in > > while it might be very useful for experts, becomes too subtle and would > confuse new people. We should instead require an explicit -l/--list, and > not use the auto listing heuristics (it is fine for -v to imply -l).
Sorry, I'm atrociously behind on reviewing this topic. But FWIW, I completely agree with this. Detecting invalid branch formats is much too subtle and error prone, and we are better off making a short and easy-to-type version of "--list".
-Peff