Commit 0cd2c74
committed
test_config, test_unconfig: add a
In the spirit of 8d1a744 (setup.c: create `safe.bareRepository`,
2022-07-14), Git's test suite should be prepared for a potential default
change of that setting from `all` to `explicit`. The `test_config` and
`test_unconfig` helpers use `git -C <dir> config` under the hood, and
that triggers implicit bare repository discovery when <dir> is a bare
repository.
Add a `--git-dir` option alongside the existing `-C` option. When
specified, the helpers pass `--git-dir=<dir>` instead of `-C <dir>` to
the underlying `git config` call, and the `test_when_finished` cleanup
registered by `test_config` uses `test_unconfig --git-dir` accordingly.
This ensures that both the set and the unset paths bypass discovery.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>--git-dir option1 parent f5ec623 commit 0cd2c74
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
587 | 593 | | |
588 | | - | |
| 594 | + | |
| 595 | + | |
589 | 596 | | |
590 | 597 | | |
591 | 598 | | |
| |||
598 | 605 | | |
599 | 606 | | |
600 | 607 | | |
| 608 | + | |
601 | 609 | | |
602 | 610 | | |
603 | 611 | | |
604 | 612 | | |
605 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
606 | 619 | | |
607 | 620 | | |
608 | 621 | | |
| |||
613 | 626 | | |
614 | 627 | | |
615 | 628 | | |
616 | | - | |
617 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
618 | 633 | | |
619 | 634 | | |
620 | 635 | | |
| |||
0 commit comments