From: Junio C Hamano Date: Thu, 06 Jul 2017 17:03:49 GMT Subject: Re: name-rev: anchor pattern without --exclude? Message-ID: In-Reply-To: <87k23ltsl6.fsf@kyleam.com> Kyle Meyer 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}/". > > We want to use name-rev to map a commit to a name in "refs/heads/", > ignoring these snapshot refs. What is the in the above supposed to represent? When a user sees two refs "refs/wip/{wtree,index}/", 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".