aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:07:02 +0000
committerJunio C Hamano <gitster@pobox.com>2017-10-16 11:05:51 +0900
commitb420d90980a31246836680b68ca15e0239a8b696 (patch)
tree2e455c17799c655f6f79f8d31a50deec0dae04ac /refs.h
parent188960b4d68e0b77e31481592b86306a9ce37632 (diff)
downloadgit-b420d90980a31246836680b68ca15e0239a8b696.tar.gz
git-b420d90980a31246836680b68ca15e0239a8b696.tar.xz
refs: convert peel_ref to struct object_id
Convert peel_ref (and its corresponding backend) to struct object_id. This transformation was done with an update to the declaration, definition, comments, and test helper and the following semantic patch: @@ expression E1, E2; @@ - peel_ref(E1, E2.hash) + peel_ref(E1, &E2) @@ expression E1, E2; @@ - peel_ref(E1, E2->hash) + peel_ref(E1, E2) 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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/refs.h b/refs.h
index 9d59c414a..89f28d482 100644
--- a/refs.h
+++ b/refs.h
@@ -114,14 +114,14 @@ extern int refs_init_db(struct strbuf *err);
/*
* If refname is a non-symbolic reference that refers to a tag object,
* and the tag can be (recursively) dereferenced to a non-tag object,
- * store the SHA1 of the referred-to object to sha1 and return 0. If
- * any of these conditions are not met, return a non-zero value.
+ * store the object ID of the referred-to object to oid and return 0.
+ * If any of these conditions are not met, return a non-zero value.
* Symbolic references are considered unpeelable, even if they
* ultimately resolve to a peelable tag.
*/
int refs_peel_ref(struct ref_store *refs, const char *refname,
- unsigned char *sha1);
-int peel_ref(const char *refname, unsigned char *sha1);
+ struct object_id *oid);
+int peel_ref(const char *refname, struct object_id *oid);
/**
* Resolve refname in the nested "gitlink" repository in the specified