Skip to content

clone: update origin's HEAD#5651

Merged
ethomson merged 2 commits into
masterfrom
ethomson/clone_branch
Oct 11, 2020
Merged

clone: update origin's HEAD#5651
ethomson merged 2 commits into
masterfrom
ethomson/clone_branch

Conversation

@ethomson

@ethomson ethomson commented Oct 5, 2020

Copy link
Copy Markdown
Member

Update the origin's HEAD as a symbolic reference pointing to the origin's default branch at clone time. This involves populating refs/remotes/origin/HEAD as a symref to refs/remotes/origin/<default>.

It looks like the machinery was almost there to do this, so either we did this once and regressed due to lack of testing, or it was just never completed. In either case, I hoisted the incomplete pieces into their own function, finished it up, and included a test.

Fixes #5646

Ensure that we created `refs/remotes/origin/HEAD` when cloning, a
symbolic link pointing to `refs/remotes/origin/<default>`
@ethomson ethomson force-pushed the ethomson/clone_branch branch from 883ef6b to 61f6008 Compare October 6, 2020 13:00
Update `refs/remotes/origin/HEAD` as a symbolic link to the remote's
default branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fetching the remote HEAD (aka default branch)

1 participant