Skip to content

Commit

Permalink
Typefix builtin-prune.c::prune_object()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 24, 2006
1 parent 21f88ac commit ac1471b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions builtin-prune.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit ac1471b

Please sign in to comment.