Skip to content

Commit

Permalink
Merge branch 'ap/prune'
Browse files Browse the repository at this point in the history
* ap/prune:
  Typefix builtin-prune.c::prune_object()
  Improve git-prune -n output
  • Loading branch information
Junio C Hamano committed Nov 24, 2006
2 parents 3fbe2d5 + ac1471b commit f3307de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion builtin-prune.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ static struct rev_info revs;

static int prune_object(char *path, const char *filename, const unsigned char *sha1)
{
char buf[20];
const char *type;

if (show_only) {
printf("would prune %s/%s\n", path, filename);
if (sha1_object_info(sha1, buf, NULL))
type = "unknown";
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 f3307de

Please sign in to comment.