Re: [PATCH v2 1/1] branch: introduce --show-current display option
- From
Rafael Ascensão <rafa.almas@gmail.com>
- Date
- Oct 11, 2018, 22:34 UTC
- Message-ID
- <20181011223457.GB7131@rigel>
- In-Reply-To
- <20181011205323.GB11618@sigill.intra.peff.net>
On Thu, Oct 11, 2018 at 04:53:23PM -0400, Jeff King wrote:
Show 7 quoted lines
> Right, I like that part. It's just that putting "HEAD" there already has > a meaning: it would find refs/heads/HEAD. > > Now I'll grant that's a bad name for a branch (and the source of other > confusions, and I think perhaps even something a few commands actively > discourage these days). >
Makes sense. My whole premise was based on the fact that refs/heads/HEAD wouldn't be supported. Now it's obvious to me that isn't necessarily true. And now I understand the real issue. Thanks for bearing with me.
I also agree with your proposed '--list-head' suggestion.
So, ideally, instead of my broken suggestion of:
$ git branch --verbose --list HEAD feature1 hotfix-*;The equivalent would be:
$ git branch --verbose --list-head --list feature1 hotfix-*;and it would coalesce nicely as long as --list-head conforms with the default formatting for --list.
-- Cheers Rafael Ascensão