Re: [BUG] branch renamed to 'HEAD'
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Feb 27, 2017, 23:05 UTC
- Message-ID
- <CA+P7+xpVt6NtSajqMX8OQ_SKdC9tfHH40JgK=9DgBxo9nMaWLA@mail.gmail.com>
- In-Reply-To
- <xmqq60jvnu9y.fsf@gitster.mtv.corp.google.com>
On Mon, Feb 27, 2017 at 2:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> I guess something like the patch below works, but I wonder if there is a
>> less-horrible way to accomplish the same thing.
>
> I suspect that a less-horrible would be a lot more intrusive. It
> would go like "interpret-branch-name only gives local branch name,
> and when it does not show it, the callers that know they do not
> necessarily need local branch name would call other at-mark things".
> As you pointed out with the @{upstream} that potentially point at a
> local branch, it will quickly get more involved, I would think, and
> I tend to think that this patch of yours is probably the least evil
> one among possible solutions.
>
> Perhaps with s/not_in_refs_heads/not_a_branch_name/ (or swapping
> polarity, "is_a_branch_name"), the resulting code may not be too
> hard to read?
>
> Thanks.What about changing interpret-branch-name gains a flag to return a fully qualified ref rather than returning just the name? That seems like it would be more reasonable behavior.
Thanks, Jake