user/dev discussion of public-inbox itself
 help / Atom feed
* [PATCH] t/v2writable.t: force more consistent "git log" output
@ 2019-01-10  3:26 Eric Wong
  0 siblings, 0 replies; 1+ messages in thread
From: Eric Wong @ 2019-01-10  3:26 UTC (permalink / raw)
  To: meta; +Cc: Johannes Berg

This should probably use lower-level git plumbing, but until
then, consistently add a bunch of --no-* options to "git log"
to get more consistent output.

Noticed-by: Johannes Berg
  https://public-inbox.org/meta/1538164205.14416.76.camel@sipsolutions.net/
---
 t/v2writable.t | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/t/v2writable.t b/t/v2writable.t
index c7eeee9..a649a5b 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -201,13 +201,14 @@ EOF
 };
 {
 	local $ENV{NPROC} = 2;
-	my @before = $git0->qx(qw(log --pretty=oneline));
-	my $before = $git0->qx(qw(log --pretty=raw --raw -r --no-abbrev));
+	my @log = qw(log --no-decorate --no-abbrev --no-notes --no-color);
+	my @before = $git0->qx(@log, qw(--pretty=oneline));
+	my $before = $git0->qx(@log, qw(--pretty=raw --raw -r));
 	$im = PublicInbox::V2Writable->new($ibx, 1);
 	is($im->{partitions}, 1, 'detected single partition from previous');
 	my $smsg = $im->remove($mime, 'test removal');
 	$im->done;
-	my @after = $git0->qx(qw(log --pretty=oneline));
+	my @after = $git0->qx(@log, qw(--pretty=oneline));
 	my $tip = shift @after;
 	like($tip, qr/\A[a-f0-9]+ test removal\n\z/s,
 		'commit message propagated to git');
@@ -219,7 +220,7 @@ EOF
 	my $srch = $ibx->search->reopen;
 	my $mset = $srch->query('m:'.$smsg->mid, { mset => 1});
 	is($mset->size, 0, 'no longer found in Xapian');
-	my @log1 = qw(log -1 --pretty=raw --raw -r --no-abbrev --no-renames);
+	my @log1 = (@log, qw(-1 --pretty=raw --raw -r --no-renames));
 	is($srch->{over_ro}->get_art($num), undef,
 		'removal propagated to Over DB');
 
-- 
EW

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10  3:26 [PATCH] t/v2writable.t: force more consistent "git log" output Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox