Merge branch 'bc/prune-info'

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
This commit is contained in:
Junio C Hamano
2012-08-29 14:49:39 -07:00

View File

@ -25,7 +25,8 @@ static int prune_tmp_object(const char *path, const char *filename)
return error("Could not stat '%s'", fullpath); return error("Could not stat '%s'", fullpath);
if (st.st_mtime > expire) if (st.st_mtime > expire)
return 0; 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) if (!show_only)
unlink_or_warn(fullpath); unlink_or_warn(fullpath);
return 0; return 0;