Skip to content

Commit f56d036

Browse files
committed
Merge branch 'bc/prune-info' into maint
"git prune" without "-v" used to warn about leftover temporary files (which is an indication of an earlier aborted operation). * bc/prune-info: prune.c: only print informational message in show_only or verbose mode
2 parents e3f2675 + 90b29cb commit f56d036

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)