user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: meta@public-inbox.org
Cc: "Thomas Weißschuh" <thomas@t-8ch.de>
Subject: [PATCH] t/index-git-times: support non-master default branch
Date: Tue, 26 Oct 2021 00:24:53 +0200	[thread overview]
Message-ID: <20211025222453.252181-1-thomas@t-8ch.de> (raw)

---
 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


             reply	other threads:[~2021-10-25 22:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 22:24 Thomas Weißschuh [this message]
2021-10-25 22:58 ` [PATCH] t/index-git-times: support non-master default branch 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025222453.252181-1-thomas@t-8ch.de \
    --to=thomas@t-8ch.de \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).