summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 21f88ac)
raw | patch | inline | side by side (parent: 21f88ac)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Nov 2006 10:54:37 +0000 (02:54 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Nov 2006 10:54:37 +0000 (02:54 -0800) |
It passed (const char*) to a function that took a (char *); the
buffer itself was of course writable, so pass the buffer itself.
Signed-off-by: Junio C Hamano <junkio@cox.net>
buffer itself was of course writable, so pass the buffer itself.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-prune.c | patch | blob | history |
diff --git a/builtin-prune.c b/builtin-prune.c
index 286a94c3fc46e2af1f0a31fbaa4aaacf7b876783..8591d28b8e91c94636e9bf8b7e8ff5abcc0705e9 100644 (file)
--- a/builtin-prune.c
+++ b/builtin-prune.c
@@ -20,10 +20,11 @@ static int prune_object(char *path, const char *filename, const unsigned char *s
const char *type;
if (show_only) {
- type = buf;
- if (sha1_object_info(sha1, type, NULL))
+ if (sha1_object_info(sha1, buf, NULL))
type = "unknown";
- printf("%s %s\n", sha1_to_hex(sha1), type );
+ else
+ type = buf;
+ printf("%s %s\n", sha1_to_hex(sha1), type);
return 0;
}
unlink(mkpath("%s/%s", path, filename));