X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fgit.t;h=d8957e422fd31083815fa46f6df9dfd166fc0d5b;hb=6e9397d12635eae55c9114ed9689413154fed8ce;hp=08b4a9182f60832794292d1aed572fa1741323a3;hpb=7b7d4bd01b564969eb0c1904a5bd9ee4f3dbba72;p=public-inbox.git diff --git a/t/git.t b/t/git.t index 08b4a918..d8957e42 100644 --- a/t/git.t +++ b/t/git.t @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ use strict; use Test::More; @@ -9,7 +9,7 @@ use POSIX qw(strftime); use PublicInbox::Git; { - PublicInbox::Import::init_bare($dir); + PublicInbox::Import::init_bare($dir, 'master'); my $fi_data = './t/git.fast-import-data'; open my $fh, '<', $fi_data or die "fast-import data readable (or run test at top level: $!"; @@ -44,7 +44,7 @@ use PublicInbox::Git; my $f = 'HEAD:foo.txt'; my @x = $gcf->check($f); is(scalar @x, 3, 'returned 3 element array for existing file'); - like($x[0], qr/\A[a-f0-9]{40}\z/, 'returns obj ID in 1st element'); + like($x[0], qr/\A[a-f0-9]{40,64}\z/, 'returns obj ID in 1st element'); is('blob', $x[1], 'returns obj type in 2nd element'); like($x[2], qr/\A\d+\z/, 'returns obj size in 3rd element');