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>
This commit is contained in:
@ -20,9 +20,10 @@ static int prune_object(char *path, const char *filename, const unsigned char *s
|
|||||||
const char *type;
|
const char *type;
|
||||||
|
|
||||||
if (show_only) {
|
if (show_only) {
|
||||||
type = buf;
|
if (sha1_object_info(sha1, buf, NULL))
|
||||||
if (sha1_object_info(sha1, type, NULL))
|
|
||||||
type = "unknown";
|
type = "unknown";
|
||||||
|
else
|
||||||
|
type = buf;
|
||||||
printf("%s %s\n", sha1_to_hex(sha1), type);
|
printf("%s %s\n", sha1_to_hex(sha1), type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user