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:
authorJonathan Tan <jonathantanmy@google.com>2017-08-19 01:20:29 +0300
committerJunio C Hamano <gitster@pobox.com>2017-08-24 01:12:07 +0300
commit3588dd6e994b38b02c2f60544fe2f69ce5fdf927 (patch)
tree0a3297c84872f577fb8bf9351811c249f0dff682 /sha1_file.c
parent7b3aa75df7db72a283a11b9ce41658b89576db2b (diff)
pack: move unpack_object_header()
Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 38c1084560..ccf225f055 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1172,32 +1172,6 @@ static const unsigned char *get_delta_base_sha1(struct packed_git *p,
return NULL;
}
-int unpack_object_header(struct packed_git *p,
- struct pack_window **w_curs,
- off_t *curpos,
- unsigned long *sizep)
-{
- unsigned char *base;
- unsigned long left;
- unsigned long used;
- enum object_type type;
-
- /* use_pack() assures us we have [base, base + 20) available
- * as a range that we can look at. (Its actually the hash
- * size that is assured.) With our object header encoding
- * the maximum deflated object size is 2^137, which is just
- * insane, so we know won't exceed what we have been given.
- */
- base = use_pack(p, w_curs, *curpos, &left);
- used = unpack_object_header_buffer(base, left, &type, sizep);
- if (!used) {
- type = OBJ_BAD;
- } else
- *curpos += used;
-
- return type;
-}
-
static int retry_bad_packed_offset(struct packed_git *p, off_t obj_offset)
{
int type;