Thanks to visit codestin.com
Credit goes to github.com

Skip to content

clone: update origin's HEAD #5651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 11, 2020
Merged

clone: update origin's HEAD #5651

merged 2 commits into from
Oct 11, 2020

Conversation

ethomson
Copy link
Member

@ethomson ethomson commented Oct 5, 2020

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