Typefix builtin-prune.c::prune_object()
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>
Junio C Hamano committed
Nov 24, 2006 at 02:54 UTC
ac1471b39f1413046d4e338d898a93e403cbd3e5
1 file changed
+4
-3
builtin-prune.c
+4
-3
@@ -20,10 +20,11 @@ static int prune_object(char *path, const char *filename, const unsigned char *s
20
const char *type;
21
22
if (show_only) {
23
- type = buf;
24
- if (sha1_object_info(sha1, type, NULL))
23
+ if (sha1_object_info(sha1, buf, NULL))
24
type = "unknown";
26
- printf("%s %s\n", sha1_to_hex(sha1), type );
25
+ else
26
+ type = buf;
27
+ printf("%s %s\n", sha1_to_hex(sha1), type);
28
return 0;
29
}
30
unlink(mkpath("%s/%s", path, filename));