From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 39FF81F670 for ; Mon, 25 Oct 2021 22:25:03 +0000 (UTC) From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=t-8ch.de; s=mail; t=1635200694; bh=DZUtyqtrS6hbYAuf6Diya7xTk6C/6CLRg/n337qtrGM=; h=From:To:Cc:Subject:Date:From; b=HBvEFh0KSvK2+iP+mAHE1paNY8PCUUwhrjcg1RdgwnaqGuLOvCmMq/juYqYEws204 YVa0yIS73Ayb02vCr6atdC+mjxoBS7Xce77lVw4NcS7ufqt1l3hrHViP9RaMNeH2gw FBt6obugkPXlFlrlDORjPAwu2u3QjWItvrL6BWqc= To: meta@public-inbox.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Subject: [PATCH] t/index-git-times: support non-master default branch Date: Tue, 26 Oct 2021 00:24:53 +0200 Message-Id: <20211025222453.252181-1-thomas@t-8ch.de> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- t/index-git-times.t | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/t/index-git-times.t b/t/index-git-times.t index 3cfb99f4..52173396 100644 --- a/t/index-git-times.t +++ b/t/index-git-times.t @@ -7,6 +7,7 @@ use Test::More; use PublicInbox::TestCommon; use PublicInbox::Config; use PublicInbox::Admin; +use PublicInbox::Import; use File::Path qw(remove_tree); require_mods(qw(DBD::SQLite Search::Xapian)); @@ -16,27 +17,28 @@ my ($tmpdir, $for_destroy) = tmpdir(); local $ENV{PI_CONFIG} = "$tmpdir/cfg"; my $v1dir = "$tmpdir/v1"; my $addr = 'x@example.com'; +my $default_branch = PublicInbox::Import::default_branch; run_script(['-init', '--indexlevel=medium', 'v1', $v1dir, 'http://example.com/x', $addr]) or die "init failed"; { - my $data = <<'EOF'; + my $data = <<"EOF"; blob mark :1 data 133 -From: timeless -To: x +From: timeless +To: x Subject: can I haz the time? -Message-ID: <19700101000000-1234@example.com> +Message-ID: <19700101000000-1234\@example.com> plz -reset refs/heads/master -commit refs/heads/master +reset $default_branch +commit $default_branch mark :2 -author timeless 749520000 +0100 -committer x 1285977600 -0100 +author timeless 749520000 +0100 +committer x 1285977600 -0100 data 20 can I haz the time? M 100644 :1 53/256f6177504c2878d3a302ef5090dacf5e752c base-commit: 7319f5d318a960eeb32a207d226eea7fd9ce2543 -- 2.33.1