Skip to contentSkip to conversation

How to know where a reference name comes from?

DISCUSSION Matthieu Moy 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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,

Signature · 1 line
Matthieu
#1 lore raw
Quoted 2 lines · Matthieu Moy

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