summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-04-26 11:39:53 -0400
committerEdward Thomson <ethomson@github.com>2016-04-26 13:19:58 -0400
commitd55923788c6b43351db2bc7555aef3bea391a1f4 (patch)
tree05e15007fa8284488c5f15aa12fd2730c364414f /src/repository.c
parentb3ffd8f63840b2401fa2e636163512a8f0f17b47 (diff)
downloadlibgit2-ethomson/annotated_commit_refs.tar.gz
annotated_commit: provide refs and descriptionethomson/annotated_commit_refs
Differentiate between the ref_name used to create an annotated_commit (that can subsequently be used to look up the reference) and the description that we resolved this with (which _cannot_ be looked up). The description is used for things like reflogs (and may be a ref name, and ID something that we revparsed to get here), while the ref name must actually be a reference name, and is used for things like rebase to return to the initial branch.
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index 8a6fef0f6..d39a9015d 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2162,7 +2162,7 @@ int git_repository_set_head_detached_from_annotated(
{
assert(repo && commitish);
- return detach(repo, git_annotated_commit_id(commitish), commitish->ref_name);
+ return detach(repo, git_annotated_commit_id(commitish), commitish->description);
}
int git_repository_detach_head(git_repository* repo)