commit: actually allow yet to be born update_ref

git_commit_create is supposed to update the given reference
"update_ref", but segfaulted in case of a yet to be born
reference. Fix it.

Signed-off-by: schu <schu-github@schulog.org>
This commit is contained in:
schu
2012-02-15 00:12:53 +01:00
parent 66faeb5c5d
commit b4b79ac3db
3 changed files with 53 additions and 4 deletions

View File

@@ -191,7 +191,8 @@ GIT_EXTERN(const git_oid *) git_commit_parent_oid(git_commit *commit, unsigned i
* will be updated to point to this commit. If the reference
* is not direct, it will be resolved to a direct reference.
* Use "HEAD" to update the HEAD of the current branch and
* make it point to this commit
* make it point to this commit. If the reference doesn't
* exist yet, it will be created.
*
* @param author Signature representing the author and the authory
* time of this commit