summaryrefslogtreecommitdiff
path: root/src/branch.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/branch.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/branch.c')
-rw-r--r--src/branch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/branch.c b/src/branch.c
index 0dcc14c29..51c35d7ff 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -121,7 +121,8 @@ int git_branch_create_from_annotated(
const git_annotated_commit *commit,
int force)
{
- return create_branch(ref_out, repository, branch_name, commit->commit, commit->ref_name, force);
+ return create_branch(ref_out,
+ repository, branch_name, commit->commit, commit->description, force);
}
int git_branch_delete(git_reference *branch)