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

Re: name-rev: anchor pattern without --exclude?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2017, 17:03 UTC
Message-ID
<xmqqfue9fqfe.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<87k23ltsl6.fsf@kyleam.com>
Kyle Meyer <kyle@kyleam.com> writes:
Show 7 quoted lines
> [*] A bit more information on why I'm trying to do this: In Magit, we
>     have a work-in-progress feature that takes "snapshots" of changes
>     before they are committed.  These snapshots are stored as
>     "refs/wip/{wtree,index}/<full refname>".
>
>     We want to use name-rev to map a commit to a name in "refs/heads/",
>     ignoring these snapshot refs.

What is the <full refname> in the above supposed to represent? When a user sees two refs "refs/wip/{wtree,index}/<full refname>", does it mean: "These two represent a snapshot for changes while the user was working on this branch"?

Isn't name-rev a wrong tool to find that information? What is the answer desired by your application when two or more branches point at the same commit you are interested in? Pick one at random? An error saying it cannot decide where to place the snapshot?

I am wondering if you are looking for "symbolic-ref HEAD".
Previous: Kyle MeyerNext: Kyle Meyer
Message 2 of 5 in “name-rev: anchor pattern without --exclude?”
  1. Kyle MeyerJul 6, 2017
  2. Junio C HamanoJul 6, 2017
  3. Kyle MeyerJul 6, 2017
  4. Bryan TurnerJul 6, 2017
  5. Kyle MeyerJul 6, 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.