Skip to contentSkip to conversation

strange behaviour, default branch on clone not as expected

DISCUSSION Chris Friesen 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I have a bare repository on a server with (among others) branches "atca6900-ecgl" and "ncgl". The "HEAD" file in the bare repository contains "ref: refs/heads/ncgl" and "git branch" in the bare repository shows an asterisk beside "ncgl".

However, if I clone the bare repository I get "atca-6900-ecgl" as the default branch. ".git/HEAD" contains "ref: refs/heads/atca6900-ecgl".

Something that might be relevent--currently both of these branches actually point to the same commit (Don't ask, it's a vendor thing.) thus "refs/heads/atca6900-ecgl" and "refs/heads/ncgl" have the same contents.
I find it suspicious that atca6900-ecgl is alphabetically before ncgl
and that they point to the same commit ID...but I don't know how it works internally so this may be just coincidence.

Any ideas what's going on? I'm using git 1.7.3.2 if it makes any difference.

Chris

Signature · 5 lines
Chris Friesen
Software Developer
GENBAND
[email protected]
www.genband.com
#1 lore raw
Quoted 7 lines · Chris Friesen

I have a bare repository on a server with (among others) branches "atca6900-ecgl" and "ncgl". The "HEAD" file in the bare repository contains "ref: refs/heads/ncgl" and "git branch" in the bare repository shows an asterisk beside "ncgl".

However, if I clone the bare repository I get "atca-6900-ecgl" as the default branch. ".git/HEAD" contains "ref: refs/heads/atca6900-ecgl".

If ncgl is at the same commit as the acta one, this is expected. The protocol does not carry enough information to tell which branch HEAD points at.