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
Родитель 8748f3c52e 90b29cb7a8
Коммит b49203ba02
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

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