user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/2] import: pass --quiet to `git gc' if STDERR isn't a tty
  2022-09-02 18:26  4% [PATCH 0/2] lei-related import tweaks Eric Wong
@ 2022-09-02 18:26  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-09-02 18:26 UTC (permalink / raw)
  To: meta

No need to pollute non-interactive output for gc use.  This
suppresses notifications from my `lei up --all -q' cronjob.
---
 lib/PublicInbox/Import.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 2c8f310a..04192174 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -192,7 +192,10 @@ sub _update_git_info ($$) {
 		};
 		warn "$ibx->{inboxdir} index failed: $@\n" if $@;
 	}
-	eval { run_die([@cmd, qw(gc --auto)]) } if $do_gc;
+	if ($do_gc) {
+		my @quiet = (-t STDERR ? () : '-q');
+		eval { run_die([@cmd, qw(gc --auto), @quiet]) }
+	}
 }
 
 sub barrier {

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] lei-related import tweaks
@ 2022-09-02 18:26  4% Eric Wong
  2022-09-02 18:26  7% ` [PATCH 2/2] import: pass --quiet to `git gc' if STDERR isn't a tty Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-09-02 18:26 UTC (permalink / raw)
  To: meta

Just some minor nits I noticed in lei-land...

Eric Wong (2):
  lei/store: do not write info/refs file
  import: pass --quiet to `git gc' if STDERR isn't a tty

 lib/PublicInbox/Import.pm | 7 +++++--
 t/lei_store.t             | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

^ permalink raw reply	[relevance 4%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-09-02 18:26  4% [PATCH 0/2] lei-related import tweaks Eric Wong
2022-09-02 18:26  7% ` [PATCH 2/2] import: pass --quiet to `git gc' if STDERR isn't a tty Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).