diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-06-22 16:02:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-22 13:17:08 -0700 |
commit | fc1c21689d6d82551f6136a3116876005b4e00a4 (patch) | |
tree | 44bbe126fb0c3835bd4d6e71726cfcec5ae40bca /refs.h | |
parent | a5fe66802f8c4036badd54ff36ff327d43236e7e (diff) | |
download | git-fc1c21689d6d82551f6136a3116876005b4e00a4.tar.gz |
delete_ref(): move declaration to refs.h
Also
* Add a docstring
* Rename the second parameter to "old_sha1", to be consistent with the
convention used elsewhere in the refs module
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -202,6 +202,16 @@ extern int read_ref_at(const char *refname, unsigned int flags, /** Check if a particular reflog exists */ extern int reflog_exists(const char *refname); +/* + * Delete the specified reference. If old_sha1 is non-NULL and not + * NULL_SHA1, then verify that the current value of the reference is + * old_sha1 before deleting it. If old_sha1 is NULL or NULL_SHA1, + * delete the reference if it exists, regardless of its old value. + * flags is passed through to ref_transaction_delete(). + */ +extern int delete_ref(const char *refname, const unsigned char *old_sha1, + unsigned int flags); + /** Delete a reflog */ extern int delete_reflog(const char *refname); |