tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH b4] tests: explicitly clone master branch from git bundle
@ 2023-01-08 21:24 Thomas Weißschuh
  2023-01-11 18:38 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2023-01-08 21:24 UTC (permalink / raw)
  To: Kernel.org Tools; +Cc: Konstantin Ryabitsev, Thomas Weißschuh

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>

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

* Re: [PATCH b4] tests: explicitly clone master branch from git bundle
  2023-01-08 21:24 [PATCH b4] tests: explicitly clone master branch from git bundle Thomas Weißschuh
@ 2023-01-11 18:38 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2023-01-11 18:38 UTC (permalink / raw)
  To: Kernel.org Tools, Thomas Weißschuh

On Sun, 08 Jan 2023 21:24:20 +0000, Thomas Weißschuh wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[1/1] tests: explicitly clone master branch from git bundle
      commit: f72d94dfbbfb5cdba0b37621367ccf2508a8d6b4

Best regards,
-- 
Konstantin Ryabitsev <konstantin@linuxfoundation.org>

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

end of thread, other threads:[~2023-01-11 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-08 21:24 [PATCH b4] tests: explicitly clone master branch from git bundle Thomas Weißschuh
2023-01-11 18:38 ` Konstantin Ryabitsev

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 NNTP newsgroup(s).