summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-10 15:37:37 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-10 15:37:37 -0700
commitf56d036ce95616b3339a11ecf50b717d5cf67c85 (patch)
tree64c88b9baad1e2ea05464624263f3848a044d426 /builtin
parentMerge branch 'maint-1.7.11' into maint (diff)
parentprune.c: only print informational message in show_only or verbose mode (diff)
downloadtgif-f56d036ce95616b3339a11ecf50b717d5cf67c85.tar.xz
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/prune.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index b99b635e44..6cb99443c1 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -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;