Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-02-24 07:37:54 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-24 23:55:53 +0300
commit2fecc48cade44529dff2594eadfb294643cdc24d (patch)
tree7ec3b9182be4b385a49e897839f0d23715a44ab9 /packfile.h
parent6ac9760a30683a24e80a7aefe30e383046e810f0 (diff)
packfile: drop nth_packed_object_sha1()
Once upon a time, nth_packed_object_sha1() was the primary way to get the oid of a packfile's index position. But these days we have the more type-safe nth_packed_object_id() wrapper, and all callers have been converted. Let's drop the "sha1" version (turning the safer wrapper into a single function) so that nobody is tempted to introduce new callers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/packfile.h b/packfile.h
index 95b83ba25b..240aa73b95 100644
--- a/packfile.h
+++ b/packfile.h
@@ -121,15 +121,9 @@ void check_pack_index_ptr(const struct packed_git *p, const void *ptr);
int bsearch_pack(const struct object_id *oid, const struct packed_git *p, uint32_t *result);
/*
- * Return the SHA-1 of the nth object within the specified packfile.
- * Open the index if it is not already open. The return value points
- * at the SHA-1 within the mmapped index. Return NULL if there is an
- * error.
- */
-const unsigned char *nth_packed_object_sha1(struct packed_git *, uint32_t n);
-/*
- * Like nth_packed_object_sha1, but write the data into the object specified by
- * the the first argument. Returns 0 on success, negative otherwise.
+ * Write the oid of the nth object within the specified packfile into the first
+ * parameter. Open the index if it is not already open. Returns 0 on success,
+ * negative otherwise.
*/
int nth_packed_object_id(struct object_id *, struct packed_git *, uint32_t n);