FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

documentation: improve docs for `checkout_head` by ethomson · Pull Request #3822 · libgit2/libgit2 · GitHub

Repository navigation

documentation: improve docs for checkout_head - #3822

Merged
carlosmn merged 1 commit into
masterfrom
ethomson/checkout_head_docs
Jun 16, 2016
Merged

carlosmn merged 1 commit into
masterfrom
ethomson/checkout_head_docs

Conversation

Copy link
Copy Markdown
Member

git_checkout_head is sadly misunderstood as something that can
switch branches. It cannot. Update the documentation to reflect this.

Fixes #2864

Comment thread include/git2/checkout.h Outdated
* do not change your `HEAD` and then call this method, that would leave
* you with checkout conflicts since your working directory would then
* appear to be dirty. Instead, checkout the target of the branch and
* then update `HEAD` if that was successful.

carlosmn Jun 14, 2016 •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should we mention git_repository_set_head() here, as that's the convenient way we offer to switch the active branch?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Updated to mention git_repository_set_head.

`git_checkout_head` is sadly misunderstood as something that can
switch branches.  It cannot.  Update the documentation to reflect this.
ethomson force-pushed the ethomson/checkout_head_docs branch from 54e8df8 to b926648 Compare June 15, 2016 20:24
carlosmn merged commit 3e9830d into master Jun 16, 2016
ethomson deleted the ethomson/checkout_head_docs branch January 13, 2017 12:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL