Browse Source

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
maint
Junio C Hamano 13 years ago
parent
commit
b49203ba02
  1. 3
      builtin/prune.c

3
builtin/prune.c

@ -25,7 +25,8 @@ static int prune_tmp_object(const char *path, const char *filename) @@ -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;

Loading…
Cancel
Save