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 | e3f26752b5e9d38e88a09671d124b61fb0cd5dbf (diff) | |
parent | 90b29cb7a8213a947e08c41ea4680ced7ac7c67c (diff) | |
download | git-f56d036ce95616b3339a11ecf50b717d5cf67c85.tar.gz git-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 b99b635e4..6cb99443c 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; |