summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02071b2)
raw | patch | inline | side by side (parent: 02071b2)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 12 May 2011 23:50:29 +0000 (16:50 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 May 2011 05:13:34 +0000 (22:13 -0700) |
Instead return an integer that can be given to typename() if
the caller wants a string, just like everybody else does.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the caller wants a string, just like everybody else does.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/verify-pack.c | patch | blob | history | |
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index b6079ae6cb03c7f3112c6eebc8c9a012d690a125..3a919b170726a95b19c16f984ade250d4fc24c07 100644 (file)
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
if (!sha1)
die("internal error pack-check nth-packed-object");
offset = nth_packed_object_offset(p, i);
- type = packed_object_info_detail(p, offset, &size, &store_size,
+ type = typename(packed_object_info_detail(p, offset, &size, &store_size,
&delta_chain_length,
- base_sha1);
+ base_sha1));
if (!stat_only)
printf("%s ", sha1_to_hex(sha1));
if (!delta_chain_length) {
index b1b5bb5896bb9894cd38d90cbe1d1bbd3752e5a4..cdb51120a0d354240291b162464ac2467d9bd5fe 100644 (file)
--- a/cache.h
+++ b/cache.h
extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
extern unsigned long unpack_object_header_buffer(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);
extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t);
-extern const char *packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
+extern int packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
/* Dumb servers support */
extern int update_server_info(int);
diff --git a/sha1_file.c b/sha1_file.c
index 064a33040812ba8782bf602c693abf08613d6ec7..4f96eb1a3eb5a6e6541908016bcc65dcbf721e16 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return type;
}
-const char *packed_object_info_detail(struct packed_git *p,
+int packed_object_info_detail(struct packed_git *p,
off_t obj_offset,
unsigned long *size,
unsigned long *store_size,
case OBJ_BLOB:
case OBJ_TAG:
unuse_pack(&w_curs);
- return typename(type);
+ return type;
case OBJ_OFS_DELTA:
obj_offset = get_delta_base(p, &w_curs, &curpos, type, obj_offset);
if (!obj_offset)