user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] t/solver_git: fix test to work with git <2.29
Date: Wed, 29 Sep 2021 03:02:54 +0000	[thread overview]
Message-ID: <20210929030254.5884-1-e@80x24.org> (raw)

'git diff --abbrev=40' did not abbreviate /^index / lines of
diff output with git <2.29, and 40 will be insufficient for
SHA-256.  --full-index has been around since 2005, so it's safe
to rely on.

Tested git version 2.20.0 (Debian buster).

Fixes: 751df49e7db8ba77 ("lei rediff: add --drq and --dequote-only")
---
 t/solver_git.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/solver_git.t b/t/solver_git.t
index cf450e24..1baa012b 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -89,7 +89,7 @@ Subject: Re: awesome advice
 
 WEB DESIGN EXPERT wrote:
 EOM
-	lei_ok([qw(rediff --abbrev=40 -U16 --drq)], undef,
+	lei_ok([qw(rediff --full-index -U16 --drq)], undef,
 		{ 0 => \$re, %$lei_opt });
 	my $exp = <<'EOM';
 From: me@example.com
@@ -116,7 +116,7 @@ EOM
 	$exp =~ s/^>$/> /sgm; # re-add trailing white space
 	like($lei_out, qr/\Q$exp\E/, '--drq diffstat + context');
 
-	lei_ok(qw(rediff -q --abbrev=40 -U9 t/solve/bare.patch));
+	lei_ok(qw(rediff -q --full-index -U9 t/solve/bare.patch));
 	$exp = <<'EOM';
 diff --git a/script/public-inbox-extindex b/script/public-inbox-extindex
 old mode 100644

                 reply	other threads:[~2021-09-29  3:02 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: https://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=20210929030254.5884-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --subject='Re: [PATCH] t/solver_git: fix test to work with git <2.29' \
    /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

Code repositories for project(s) associated with this 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).