git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Jeff KingNext: Junio C Hamano
Message 10 of 14 in “[BUG] branch renamed to 'HEAD'”
  1. Luc Van OostenryckFeb 27, 2017
  2. Karthik NayakFeb 27, 2017
  3. Luc Van OostenryckFeb 27, 2017
  4. Jeff KingFeb 27, 2017
  5. Jeff KingFeb 27, 2017
  6. Jeff KingFeb 27, 2017
  7. Luc Van OostenryckFeb 27, 2017
  8. Junio C HamanoFeb 27, 2017
  9. Jeff KingFeb 28, 2017
  10. Jacob KellerFeb 27, 2017
  11. Junio C HamanoFeb 28, 2017
  12. Jeff KingFeb 28, 2017
  13. Jacob KellerFeb 28, 2017
  14. Jeff KingFeb 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.