Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: "Kernel.org Tools" <tools@linux.kernel.org>
Cc: "Konstantin Ryabitsev" <konstantin@linuxfoundation.org>,
	"Thomas Weißschuh" <thomas@t-8ch.de>
Subject: [PATCH b4] tests: explicitly clone master branch from git bundle
Date: Sun, 08 Jan 2023 21:24:20 +0000	[thread overview]
Message-ID: <20230108-tests-default-branch-v1-1-58000cfdf024@t-8ch.de> (raw)

If not specified git tries to use the local default branch when cloning
from a bundle.
If the configuration "init.defaultBranch" is not "master" then the clone
from the bundle will not actually clone anything, breaking all the
tests.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
 tests/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index d8338cc4c408..8b0a8f7b5794 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -38,7 +38,7 @@ def gitdir(request, tmp_path):
         bfile = os.path.join(sampledir, 'gitdir.bundle')
     assert os.path.exists(bfile)
     dest = os.path.join(tmp_path, 'repo')
-    args = ['clone', bfile, dest]
+    args = ['clone', '--branch', 'master', bfile, dest]
     out, logstr = b4.git_run_command(None, args)
     assert out == 0
     b4.git_set_config(dest, 'user.name', b4.USER_CONFIG['name'])

---
base-commit: a055dede8ca9606b7fb4242816fb68054515e047
change-id: 20230108-tests-default-branch-70f74f633e34

Best regards,
-- 
Thomas Weißschuh <thomas@t-8ch.de>

             reply	other threads:[~2023-01-08 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08 21:24 Thomas Weißschuh [this message]
2023-01-11 18:38 ` [PATCH b4] tests: explicitly clone master branch from git bundle Konstantin Ryabitsev

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

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

  git send-email \
    --in-reply-to=20230108-tests-default-branch-v1-1-58000cfdf024@t-8ch.de \
    --to=thomas@t-8ch.de \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.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.
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).