Commit 3a7f32a
committed
lib-commit-graph: teach
Once `safe.bareRepository` defaults to `explicit`, bare repositories
can no longer be discovered implicitly via directory walking. The
commit-graph helpers `graph_git_behavior` and `graph_read_expect` in
lib-commit-graph.sh currently use `-C $DIR` to enter the bare
repository, which triggers implicit discovery.
Teach both helpers to accept a `--bare` flag. When set,
`graph_git_behavior` passes `--git-dir=$DIR` instead of `-C $DIR`, and
`graph_read_expect` sets `GIT_DIR=. && export GIT_DIR` inside the
subshell that runs `test-tool read-graph`.
See 8d1a744 (setup.c: create `safe.bareRepository`, 2022-07-14)
for the background on why implicit bare repo discovery may be rejected.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>--bare to graph helpers1 parent 1f8a88e commit 3a7f32a
1 file changed
Lines changed: 27 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
| |||
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
| |||
0 commit comments