Skip to content

Commit

Permalink
Merge branch 'bc/prune-info'
Browse files Browse the repository at this point in the history
Teach "git prune" without "-v" to be silent about leftover temporary
files.

* bc/prune-info:
  prune.c: only print informational message in show_only or verbose mode
  • Loading branch information
Junio C Hamano committed Aug 29, 2012
2 parents 8748f3c + 90b29cb commit b49203b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/prune.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ static int prune_tmp_object(const char *path, const char *filename)
return error("Could not stat '%s'", fullpath);
if (st.st_mtime > expire)
return 0;
printf("Removing stale temporary file %s\n", fullpath);
if (show_only || verbose)
printf("Removing stale temporary file %s\n", fullpath);
if (!show_only)
unlink_or_warn(fullpath);
return 0;
Expand Down

0 comments on commit b49203b

Please sign in to comment.