aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:50 +0000
committerJunio C Hamano <gitster@pobox.com>2017-10-16 11:05:50 +0900
commit2616a5e5089814188a583572bd9bf578b18a2a40 (patch)
treee332a31b1f6f6262a1c0bdd36cfe7e46b2459a7f /refs.h
parent49e9958869670d829edd63a54dabc46496a3cb48 (diff)
downloadgit-2616a5e5089814188a583572bd9bf578b18a2a40.tar.gz
git-2616a5e5089814188a583572bd9bf578b18a2a40.tar.xz
refs: convert delete_ref and refs_delete_ref to struct object_id
Convert delete_ref and refs_delete_ref to take a pointer to struct object_id. Update the documentation accordingly, including referring to null_oid in lowercase, as it is not a #define constant. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/refs.h b/refs.h
index a02b628c8..09575fc2b 100644
--- a/refs.h
+++ b/refs.h
@@ -371,19 +371,19 @@ int refs_reflog_exists(struct ref_store *refs, const char *refname);
int reflog_exists(const char *refname);
/*
- * Delete the specified reference. If old_sha1 is non-NULL, then
+ * Delete the specified reference. If old_oid is non-NULL, then
* verify that the current value of the reference is old_sha1 before
- * deleting it. If old_sha1 is NULL, delete the reference if it
- * exists, regardless of its old value. It is an error for old_sha1 to
- * be NULL_SHA1. msg and flags are passed through to
+ * deleting it. If old_oid is NULL, delete the reference if it
+ * exists, regardless of its old value. It is an error for old_oid to
+ * be null_oid. msg and flags are passed through to
* ref_transaction_delete().
*/
int refs_delete_ref(struct ref_store *refs, const char *msg,
const char *refname,
- const unsigned char *old_sha1,
+ const struct object_id *old_oid,
unsigned int flags);
int delete_ref(const char *msg, const char *refname,
- const unsigned char *old_sha1, unsigned int flags);
+ const struct object_id *old_oid, unsigned int flags);
/*
* Delete the specified references. If there are any problems, emit