move encode_in_pack_object_header() to a better place
[git/git.git] / sha1_file.c
index f3c9823..657825e 100644 (file)
@@ -1475,26 +1475,6 @@ const char *packed_object_info_detail(struct packed_git *p,
        }
 }
 
-int encode_in_pack_object_header(enum object_type type, uintmax_t size, unsigned char *hdr)
-{
-       int n = 1;
-       unsigned char c;
-
-       if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)
-               die("bad type %d", type);
-
-       c = (type << 4) | (size & 15);
-       size >>= 4;
-       while (size) {
-               *hdr++ = c | 0x80;
-               c = size & 0x7f;
-               size >>= 7;
-               n++;
-       }
-       *hdr = c;
-       return n;
-}
-
 static int packed_object_info(struct packed_git *p, off_t obj_offset,
                              unsigned long *sizep)
 {