diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-10 15:37:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-10 15:37:37 -0700 |
commit | f56d036ce95616b3339a11ecf50b717d5cf67c85 (patch) | |
tree | 64c88b9baad1e2ea05464624263f3848a044d426 /builtin | |
parent | Merge branch 'maint-1.7.11' into maint (diff) | |
parent | prune.c: only print informational message in show_only or verbose mode (diff) | |
download | tgif-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.c | 3 |
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; |