From c118d783a22a2080964899266c91c1a1ac69f481 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 23 Nov 2020 07:05:53 +0000 Subject: git: add manifest_entry method We'll be using this for MiscIdx and pre-generating the necessary JSON for manifest.js.gz, so make it easier to share code for generating per-repo JSON entries for grokmirror. --- t/www_listing.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/www_listing.t b/t/www_listing.t index 4309a5e1..63613371 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -21,8 +21,7 @@ use_ok 'PublicInbox::Git'; my ($tmpdir, $for_destroy) = tmpdir(); my $bare = PublicInbox::Git->new("$tmpdir/bare.git"); PublicInbox::Import::init_bare($bare->{git_dir}); -is(PublicInbox::ManifestJsGz::fingerprint($bare), undef, - 'empty repo has no fingerprint'); +is($bare->manifest_entry, undef, 'empty repo has no manifest entry'); { my $fi_data = './t/git.fast-import-data'; open my $fh, '<', $fi_data or die "open $fi_data: $!"; @@ -31,7 +30,7 @@ is(PublicInbox::ManifestJsGz::fingerprint($bare), undef, 'fast-import'); } -like(PublicInbox::ManifestJsGz::fingerprint($bare), qr/\A[a-f0-9]{40}\z/, +like($bare->manifest_entry->{fingerprint}, qr/\A[a-f0-9]{40}\z/, 'got fingerprint with non-empty repo'); sub tiny_test { -- cgit v1.2.3-24-ge0c7