mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
test(net/gitshallow): support modern git orphan branches
This commit is contained in:
parent
4260287467
commit
70d95be546
@ -71,8 +71,8 @@ func TestRepo_ForcePushRecovery(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Rewrite upstream history with an unrelated commit and force-push.
|
// Rewrite upstream history with an unrelated commit and force-push.
|
||||||
mustGit(t, scratch, "checkout", "--orphan", "fresh")
|
mustGit(t, scratch, "switch", "--orphan", "fresh")
|
||||||
mustGit(t, scratch, "rm", "-rf", ".")
|
mustGit(t, scratch, "rm", "-rf", "--ignore-unmatch", ".")
|
||||||
if err := os.WriteFile(filepath.Join(scratch, "data.txt"), []byte("v2\n"), 0o644); err != nil {
|
if err := os.WriteFile(filepath.Join(scratch, "data.txt"), []byte("v2\n"), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user