user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH] t/v2writable.t: force more consistent "git log" output
Date: Thu, 10 Jan 2019 03:26:15 +0000	[thread overview]
Message-ID: <20190110032615.ghyokl2wrba7ucfq@dcvr> (raw)

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

                 reply	other threads:[~2019-01-10  3:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110032615.ghyokl2wrba7ucfq@dcvr \
    --to=e@80x24.org \
    --cc=johannes@sipsolutions.net \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).