threads / discuss / 16496

How to know where a reference name comes from?

Subject: How to know where a reference name comes from?

## tl;dr

2 messages between Nov 27, 2008 and Nov 27, 2008.

replies: 1people: 2as markdown or json

Matthieu Moy· Nov 27, 2008, 09:18 UTC · lore
Hi,

I faced a simple problem: on a repository, doing almost anything with the reference "git-svn" complained about ambiguous reference. I know I have a remotes/git-svn branch, but I didn't know what the other reference could be.

I didn't find a command telling me _why_ this "git-svn" was ambiguous. I'd have loved a

$ git rev-parse --all-symbolic-full-names git-svn
or so, but I couldn't find one.

Did I miss anything obvious? (not that the problem was big, I'm just curious).

(I ended up doing "strace -e open git rev-parse git-svn", and found out I had a .git/git-svn file lying around)

Thanks,
-- 
Matthieu
Junio C Hamano· Nov 27, 2008, 09:47 UTC · re: Matthieu Moy · lore

Re: How to know where a reference name comes from?

Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> (I ended up doing "strace -e open git rev-parse git-svn", and found
> out I had a .git/git-svn file lying around)

This has been proposed for a couple of times now but I think it might be time to start insisting on a ref directly underneath $GIT_DIR to be in all caps (plus underscore) to avoid issues like this while still allowing traditional MERGE_HEAD, ORIG_HEAD and friends.

← back to recent threads