Web lists-archives.com

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




Kyle Meyer <kyle@xxxxxxxxxx> writes:

> [*] 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".