Skip to content

Commit f0a1f1d

Browse files
committed
test(git): unset gitoxide force-override env
This is a preparation for git backend interop tests
1 parent 40b3d02 commit f0a1f1d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/testsuite/git_shallow.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ fn fetch_shallow_dep_branch_and_rev(backend: Backend) -> anyhow::Result<()> {
170170
p.cargo("check")
171171
.arg_line(backend.to_arg())
172172
.arg_line(RepoMode::Shallow.to_deps_arg())
173+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
173174
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-deps"])
174175
.run();
175176

@@ -231,6 +232,7 @@ fn fetch_shallow_dep_branch_to_rev(backend: Backend) -> anyhow::Result<()> {
231232
p.cargo("check")
232233
.arg_line(backend.to_arg())
233234
.arg_line(RepoMode::Shallow.to_deps_arg())
235+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
234236
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-deps"])
235237
.run();
236238

@@ -262,6 +264,7 @@ fn fetch_shallow_dep_branch_to_rev(backend: Backend) -> anyhow::Result<()> {
262264
p.cargo("check")
263265
.arg_line(backend.to_arg())
264266
.arg_line(RepoMode::Shallow.to_deps_arg())
267+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
265268
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-deps"])
266269
.run();
267270

@@ -297,6 +300,7 @@ fn fetch_shallow_index_then_git2_fetch_complete(backend: Backend) -> anyhow::Res
297300
p.cargo("fetch")
298301
.arg_line(backend.to_arg())
299302
.arg("-Zgit=shallow-index")
303+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
300304
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
301305
.run();
302306

@@ -381,6 +385,7 @@ fn fetch_shallow_dep_then_git2_fetch_complete(backend: Backend) -> anyhow::Resul
381385
p.cargo("update")
382386
.arg_line(backend.to_arg())
383387
.arg_line(RepoMode::Shallow.to_deps_arg())
388+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
384389
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-deps"])
385390
.run();
386391

@@ -521,6 +526,7 @@ fn fetch_shallow_dep_then_gitoxide_fetch_complete(backend: Backend) -> anyhow::R
521526
p.cargo("update")
522527
.arg_line(backend.to_arg())
523528
.arg_line(RepoMode::Shallow.to_deps_arg())
529+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
524530
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-deps"])
525531
.run();
526532

@@ -565,6 +571,7 @@ fn fetch_shallow_dep_then_gitoxide_fetch_complete(backend: Backend) -> anyhow::R
565571

566572
p.cargo("update")
567573
.arg_line(Backend::Gitoxide.to_arg()) // shallow-deps is omitted intentionally
574+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
568575
.masquerade_as_nightly_cargo(&["gitoxide=fetch"])
569576
.run();
570577

@@ -641,6 +648,7 @@ fn fetch_shallow_index_then_preserve_shallow(backend: Backend) -> anyhow::Result
641648
p.cargo("fetch")
642649
.arg_line(backend.to_arg())
643650
.arg("-Zgit=shallow-index")
651+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
644652
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
645653
.run();
646654

@@ -659,6 +667,7 @@ fn fetch_shallow_index_then_preserve_shallow(backend: Backend) -> anyhow::Result
659667
p.cargo("update")
660668
.arg_line(backend.to_arg())
661669
.arg("-Zgit=shallow-index") // NOTE: the flag needs to be consistent or else a different index is created
670+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
662671
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
663672
.run();
664673

@@ -677,6 +686,7 @@ fn fetch_shallow_index_then_preserve_shallow(backend: Backend) -> anyhow::Result
677686
p.cargo("update")
678687
.arg_line(backend.to_arg())
679688
.arg("-Zgit=shallow-index")
689+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
680690
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
681691
.run();
682692

@@ -717,6 +727,7 @@ fn fetch_complete_index_then_shallow(backend: Backend) -> anyhow::Result<()> {
717727
.build();
718728
p.cargo("fetch")
719729
.arg_line(backend.to_arg())
730+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
720731
.masquerade_as_nightly_cargo(&["gitoxide=fetch"])
721732
.run();
722733

@@ -735,6 +746,7 @@ fn fetch_complete_index_then_shallow(backend: Backend) -> anyhow::Result<()> {
735746
p.cargo("update")
736747
.arg_line(backend.to_arg())
737748
.arg("-Zgit=shallow-index")
749+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
738750
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
739751
.run();
740752

@@ -758,6 +770,7 @@ fn fetch_complete_index_then_shallow(backend: Backend) -> anyhow::Result<()> {
758770
p.cargo("update")
759771
.arg_line(backend.to_arg())
760772
.arg("-Zgit=shallow-index")
773+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
761774
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
762775
.run();
763776

@@ -774,6 +787,7 @@ fn fetch_complete_index_then_shallow(backend: Backend) -> anyhow::Result<()> {
774787

775788
p.cargo("update")
776789
.arg_line(backend.to_arg())
790+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
777791
.masquerade_as_nightly_cargo(&["gitoxide=fetch"])
778792
.run();
779793

@@ -813,6 +827,7 @@ fn fetch_shallow_index_then_abort_and_update(backend: Backend) -> anyhow::Result
813827
p.cargo("fetch")
814828
.arg_line(backend.to_arg())
815829
.arg("-Zgit=shallow-index")
830+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
816831
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
817832
.run();
818833

@@ -836,6 +851,7 @@ fn fetch_shallow_index_then_abort_and_update(backend: Backend) -> anyhow::Result
836851
p.cargo("update")
837852
.arg_line(backend.to_arg())
838853
.arg("-Zgit=shallow-index")
854+
.env("__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2", "0")
839855
.masquerade_as_nightly_cargo(&["gitoxide=fetch", "git=shallow-index"])
840856
.run();
841857

0 commit comments

Comments
 (0)