From 70d95be546ddd45ac2e98dde60b521100bfe24ef Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 8 Sep 2026 17:40:49 -0600 Subject: [PATCH] test(net/gitshallow): support modern git orphan branches --- net/gitshallow/forcepush_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/gitshallow/forcepush_test.go b/net/gitshallow/forcepush_test.go index a389d21..c86a469 100644 --- a/net/gitshallow/forcepush_test.go +++ b/net/gitshallow/forcepush_test.go @@ -71,8 +71,8 @@ func TestRepo_ForcePushRecovery(t *testing.T) { } // Rewrite upstream history with an unrelated commit and force-push. - mustGit(t, scratch, "checkout", "--orphan", "fresh") - mustGit(t, scratch, "rm", "-rf", ".") + mustGit(t, scratch, "switch", "--orphan", "fresh") + mustGit(t, scratch, "rm", "-rf", "--ignore-unmatch", ".") if err := os.WriteFile(filepath.Join(scratch, "data.txt"), []byte("v2\n"), 0o644); err != nil { t.Fatal(err) }