summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8845935)
raw | patch | inline | side by side (parent: 8845935)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Feb 2007 10:39:51 +0000 (02:39 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Feb 2007 10:39:51 +0000 (02:39 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fetch--tool.c | patch | blob | history |
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index 48de08d858ca53fa369c44a79f73ec325566f36f..e9d16e631585c3795ee628ec33997548a01a01b4 100644 (file)
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
return data;
}
-static void show_new(char *type, unsigned char *sha1_new)
+static void show_new(enum object_type type, unsigned char *sha1_new)
{
- fprintf(stderr, " %s: %s\n", type,
+ fprintf(stderr, " %s: %s\n", typename(type),
find_unique_abbrev(sha1_new, DEFAULT_ABBREV));
}
const char *note,
int verbose, int force)
{
- char type[20];
unsigned char sha1_old[20], sha1_new[20];
char oldh[41], newh[41];
struct commit *current, *updated;
+ enum object_type type;
if (get_sha1_hex(new_head, sha1_new))
die("malformed object name %s", new_head);
- if (sha1_object_info(sha1_new, type, NULL))
+
+ type = sha1_object_info(sha1_new, NULL);
+ if (type < 0)
die("object %s not found", new_head);
if (!*name) {