diff options
author | Edward Thomson <ethomson@github.com> | 2016-04-26 11:39:53 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2016-04-26 13:19:58 -0400 |
commit | d55923788c6b43351db2bc7555aef3bea391a1f4 (patch) | |
tree | 05e15007fa8284488c5f15aa12fd2730c364414f /src/branch.c | |
parent | b3ffd8f63840b2401fa2e636163512a8f0f17b47 (diff) | |
download | libgit2-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.c | 3 |
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) |