Skip to content

Commit b49203b

Browse files
committed
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
2 parents 8748f3c + 90b29cb commit b49203b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/prune.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ static int prune_tmp_object(const char *path, const char *filename)
2525
return error("Could not stat '%s'", fullpath);
2626
if (st.st_mtime > expire)
2727
return 0;
28-
printf("Removing stale temporary file %s\n", fullpath);
28+
if (show_only || verbose)
29+
printf("Removing stale temporary file %s\n", fullpath);
2930
if (!show_only)
3031
unlink_or_warn(fullpath);
3132
return 0;

0 commit comments

Comments
 (0)