diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-08-29 14:49:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-29 14:49:39 -0700 |
commit | b49203ba02aab745024ed2558e3448bc946ba029 (patch) | |
tree | b5f9a2863b3727346d1469dc9a47e8af32cb1a27 | |
parent | Merge branch 'mz/cherry-code-cleanup' (diff) | |
parent | prune.c: only print informational message in show_only or verbose mode (diff) | |
download | tgif-b49203ba02aab745024ed2558e3448bc946ba029.tar.xz |
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
-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; |