Commit 25abbb4
committed
test_hook: add a
The `test_hook` helper installs hook scripts into a repository.
It currently only supports `-C <dir>` to locate the target, which
triggers implicit bare repository discovery and would fail under
`safe.bareRepository=explicit`.
Add a `--git-dir <dir>` option so that the helper can locate bare
repositories explicitly. When given, the internal `git rev-parse
--absolute-git-dir` call that resolves the hooks directory uses
`--git-dir=<dir>` instead of `-C <dir>`.
See 8d1a744 (setup.c: create `safe.bareRepository`, 2022-07-14)
for the background on implicit bare repository discovery and why it may
become the default to reject it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>--git-dir option1 parent f5ec623 commit 25abbb4
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
637 | 639 | | |
638 | 640 | | |
639 | 641 | | |
| |||
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| 656 | + | |
654 | 657 | | |
655 | 658 | | |
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
661 | 668 | | |
662 | 669 | | |
663 | 670 | | |
| |||
680 | 687 | | |
681 | 688 | | |
682 | 689 | | |
683 | | - | |
| 690 | + | |
| 691 | + | |
684 | 692 | | |
685 | 693 | | |
686 | 694 | | |
| |||
0 commit comments