# How to know where a reference name comes from?

2 messages from 2008-11-27 to 2008-11-27. Participants: Matthieu Moy, Junio C Hamano.
Thread: https://gitlist.dev/t/16496

## Matthieu Moy, 2008-11-27 09:18

Subject: How to know where a reference name comes from?
Message-ID: <vpqk5ap5xy1.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqk5ap5xy1.fsf%40bauges.imag.fr

```
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, 2008-11-27 09:47

Subject: Re: How to know where a reference name comes from?
Message-ID: <7v4p1tbiw0.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4p1tbiw0.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <vpqk5ap5xy1.fsf@bauges.imag.fr>

```
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.

```
