unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] t/index-git-times: support non-master default branch
@ 2021-10-25 22:24 Thomas Weißschuh
  2021-10-25 22:58 ` Eric Wong
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Weißschuh @ 2021-10-25 22:24 UTC (permalink / raw)
  To: meta; +Cc: Thomas Weißschuh

---
 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 <t@example.com>
-To: x <x@example.com>
+From: timeless <t\@example.com>
+To: x <x\@example.com>
 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 <t@example.com> 749520000 +0100
-committer x <x@example.com> 1285977600 -0100
+author timeless <t\@example.com> 749520000 +0100
+committer x <x\@example.com> 1285977600 -0100
 data 20
 can I haz the time?
 M 100644 :1 53/256f6177504c2878d3a302ef5090dacf5e752c

base-commit: 7319f5d318a960eeb32a207d226eea7fd9ce2543
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-10-28 19:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 22:24 [PATCH] t/index-git-times: support non-master default branch Thomas Weißschuh
2021-10-25 22:58 ` Eric Wong
2021-10-26  5:05   ` Thomas Weißschuh
2021-10-26  5:28     ` Eric Wong
2021-10-26 18:43       ` Thomas Weißschuh
2021-10-27 21:15         ` lei-q-remote-import failures [was: [PATCH] t/index-git-times: support non-master default branch] Eric Wong
2021-10-27 21:24           ` Thomas Weißschuh
2021-10-27 23:48             ` Eric Wong
2021-10-28 14:03               ` Thomas Weißschuh
2021-10-28 19:16                 ` [PATCH] test_common: clear XDG_CACHE_HOME before lei tests Eric Wong
2021-10-28 19:22                   ` Thomas Weißschuh
2021-10-26 21:24       ` [PATCH] t/index-git-times: support non-master default branch Thomas Weißschuh
2021-10-27  4:07         ` [PATCH] test_common: key test inboxes to init.defaultBranch Eric Wong
2021-10-27  5:04           ` Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).