about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-29 03:02:54 +0000
committerEric Wong <e@80x24.org>2021-09-29 03:09:39 +0000
commitea7a1afdb5b4fe417bdc606b8ee73680ce4148bf (patch)
tree39fe170dc8e949f605a96c47afca2b90966e1668 /t
parente3ea02ed136d99edde51e0da041145b2a55ea83c (diff)
downloadpublic-inbox-ea7a1afdb5b4fe417bdc606b8ee73680ce4148bf.tar.gz
t/solver_git: fix test to work with git <2.29
'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")
Diffstat (limited to 't')
-rw-r--r--t/solver_git.t4
1 files 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