************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC. *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS! *****
************************************************************
Affected Version: 2.2.1
What steps will reproduce the problem?
1. Create a branch named HEAD with a SHA other than that of the HEAD ref
2. git checkout -b master origin/master
3. git fetch
4. git fetch
What is the expected output? What do you see instead?
Fetch should default to the original HEAD pointer instead of refs/heads/HEAD. However, a branch named HEAD is able to be created and subsequent pulls will round robin between the correct and incorrect references.
Please provide any additional information below.
$ git fetch
From ssh://xxxxxx:29418/studio_new
ea30c7f..ecd8bb2 master -> origin/master
$ git fetch
From ssh://xxxxxx:29418/studio_new
+ ecd8bb2...ea30c7f HEAD -> origin/HEAD (forced update)
$ git fetch
From ssh://xxxxxx:29418/studio_new
ea30c7f..ecd8bb2 master -> origin/master