summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-08 06:12:57 (GMT)
commit4322478a496a5b729a77792584e427d9e7132386 (patch)
treef8ebe31e85015b7aa2f7e819fdde26b626a14481 /refs.h
parent9e31eafe7e98bab5013e598037e5581739fd4f42 (diff)
downloadgit-4322478a496a5b729a77792584e427d9e7132386.zip
git-4322478a496a5b729a77792584e427d9e7132386.tar.gz
git-4322478a496a5b729a77792584e427d9e7132386.tar.bz2
reflog_expire: convert to struct object_id
Adjust the callback functions to take struct object_id * instead of unsigned char *, and modify related static functions accordingly. Introduce a temporary object_id instance into files_reflog_expire and copy the SHA-1 value passed in. This is necessary because the sha1 parameter can come indirectly from get_sha1. Without the temporary, it would require much more refactoring to be able to convert this function. 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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/refs.h b/refs.h
index 07cf4cd..a22f696 100644
--- a/refs.h
+++ b/refs.h
@@ -611,10 +611,10 @@ enum expire_reflog_flags {
* unlocked again.
*/
typedef void reflog_expiry_prepare_fn(const char *refname,
- const unsigned char *sha1,
+ const struct object_id *oid,
void *cb_data);
-typedef int reflog_expiry_should_prune_fn(unsigned char *osha1,
- unsigned char *nsha1,
+typedef int reflog_expiry_should_prune_fn(struct object_id *ooid,
+ struct object_id *noid,
const char *email,
unsigned long timestamp, int tz,
const char *message, void *cb_data);