From f4f0a3be0864721d90f9557ffe1c513b0289a74b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 23 Jun 2019 17:42:05 +0000 Subject: manifest: v2 epoch descriptions based on inbox->description The default $GIT_DIR/description (provided by git.git templates) isn't very useful for v2 epochs, so use the inbox description and suffix it with the epoch number if it's otherwise unnamed. Requested-by: Konstantin Ryabitsev https://public-inbox.org/meta/20190620190017.GA27175@chatter.i7.local/ --- t/www_listing.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't/www_listing.t') diff --git a/t/www_listing.t b/t/www_listing.t index d82a4a4a..e5b797db 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -55,7 +55,12 @@ sub tiny_test { $res->{headers}->{'last-modified'}, 'modified field and Last-Modified header match'); - ok($manifest->{'/v2/git/0.git'}, 'v2 epoch appeared'); + ok(my $v2epoch0 = $manifest->{'/v2/git/0.git'}, 'v2 epoch 0 appeared'); + like($v2epoch0->{description}, qr/ \[epoch 0\]\z/, + 'epoch 0 in description'); + ok(my $v2epoch1 = $manifest->{'/v2/git/1.git'}, 'v2 epoch 1 appeared'); + like($v2epoch1->{description}, qr/ \[epoch 1\]\z/, + 'epoch 1 in description'); } my $pid; -- cgit v1.2.3-24-ge0c7