summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-07-11 05:29:51 -0700
committerVicent Martí <vicent@github.com>2012-07-11 05:29:51 -0700
commita13a30ac302ede33d8bc4b6b0c283a57f6e8cc2e (patch)
treee6cfedbe35b0b397ec89ffbdd30ea3903241e1d3 /include
parent6b9a49cd5fd6addc5b9ce3281ea33a50934f5a94 (diff)
parent3e82d6c6f0783a5c74b79d7a849e9ca319f171b5 (diff)
downloadlibgit2-a13a30ac302ede33d8bc4b6b0c283a57f6e8cc2e.tar.gz
Merge pull request #801 from nulltoken/fix/ref-renaming
refs and revparse love <3
Diffstat (limited to 'include')
-rw-r--r--include/git2/reflog.h2
-rw-r--r--include/git2/refs.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/reflog.h b/include/git2/reflog.h
index f490e29de..8acba349b 100644
--- a/include/git2/reflog.h
+++ b/include/git2/reflog.h
@@ -53,6 +53,8 @@ GIT_EXTERN(int) git_reflog_write(git_reference *ref, const git_oid *oid_old, con
/**
* Rename the reflog for the given reference
*
+ * The reflog to be renamed is expected to already exist
+ *
* @param ref the reference
* @param new_name the new name of the reference
* @return 0 or an error code
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 2aa0ac267..7f6eb0e9b 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -353,6 +353,16 @@ GIT_EXTERN(int) git_reference_foreach_glob(
void *payload
);
+/**
+ * Check if a reflog exists for the specified reference.
+ *
+ * @param ref A git reference
+ *
+ * @return 0 when no reflog can be found, 1 when it exists;
+ * otherwise an error code.
+ */
+GIT_EXTERN(int) git_reference_has_log(git_reference *ref);
+
/** @} */
GIT_END_DECL
#endif