summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-05-02 09:42:07 -0700
committerRussell Belfer <rb@github.com>2014-05-02 09:42:07 -0700
commit9862ef8ef8ffd95a74be8082acab9fea0de85edb (patch)
treeed973ac2992b496b4163c197a5858ab2faf1f9ec /include/git2
parent6a1ca96e4193f79c16c6a71dd8b5d576acf22e91 (diff)
parent217c029b54e8f1574ae6bc71c4b25533ecff3b6a (diff)
downloadlibgit2-9862ef8ef8ffd95a74be8082acab9fea0de85edb.tar.gz
Merge pull request #2310 from libgit2/cmn/commit-create-safe
commit: safer commit creation with reference update
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/commit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index 834330b5d..fb53a701b 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -254,7 +254,8 @@ GIT_EXTERN(int) git_commit_nth_gen_ancestor(
* 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. If the reference doesn't
- * exist yet, it will be created.
+ * exist yet, it will be created. If it does exist, the first
+ * parent must be the tip of this branch.
*
* @param author Signature with author and author time of commit
*
@@ -329,7 +330,7 @@ GIT_EXTERN(int) git_commit_create_v(
*
* The `update_ref` value works as in the regular `git_commit_create()`,
* updating the ref to point to the newly rewritten commit. If you want
- * to amend a commit that is not currently the HEAD of the branch and then
+ * to amend a commit that is not currently the tip of the branch and then
* rewrite the following commits to reach a ref, pass this as NULL and
* update the rest of the commit chain and ref separately.
*