1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 21:07:52 +01:00

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
commit b49203ba02

View file

@ -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;