@@ -63,6 +63,21 @@ extern void unuse_pack(struct pack_window **);
6363extern void clear_delta_base_cache (void );
6464extern struct packed_git * add_packed_git (const char * path , size_t path_len , int local );
6565
66+ /*
67+ * Return the SHA-1 of the nth object within the specified packfile.
68+ * Open the index if it is not already open. The return value points
69+ * at the SHA-1 within the mmapped index. Return NULL if there is an
70+ * error.
71+ */
72+ extern const unsigned char * nth_packed_object_sha1 (struct packed_git * , uint32_t n );
73+ /*
74+ * Like nth_packed_object_sha1, but write the data into the object specified by
75+ * the the first argument. Returns the first argument on success, and NULL on
76+ * error.
77+ */
78+ extern const struct object_id * nth_packed_object_oid (struct object_id * , struct packed_git * , uint32_t n );
79+
80+
6681extern void * unpack_entry (struct packed_git * , off_t , enum object_type * , unsigned long * );
6782extern unsigned long unpack_object_header_buffer (const unsigned char * buf , unsigned long len , enum object_type * type , unsigned long * sizep );
6883extern unsigned long get_size_from_delta (struct packed_git * , struct pack_window * * , off_t );
@@ -79,5 +94,4 @@ extern int packed_object_info(struct packed_git *pack, off_t offset, struct obje
7994
8095extern void mark_bad_packed_object (struct packed_git * p , const unsigned char * sha1 );
8196extern const struct packed_git * has_packed_and_bad (const unsigned char * sha1 );
82-
8397#endif
0 commit comments