Commit e26e7ca
committed
t5310, t5510, t5516: adjust
To avoid having to rely on implicit discovery of bare repositories
(which will go away at some stage by flipping the default of
`safe.bareRepository`), this commit replaces `-C <dir>` with
`--git-dir=<dir>`. Since `--git-dir` does not change the working
directory, a `.` that formerly referred to the `-C` target must become
`..` to reach the same location.
The code changes can be validated via this command-line:
git diff HEAD^! | awk '
/^diff/,/^\+\+\+/ { next }
/^-/ { old[m++] = substr($0, 2) }
/^\+/ {
line = substr($0,2)
# apply: -C X -> --git-dir=X and strip ../
if (match(line, /--git-dir=(.* )\. /, a)) {
gsub(/--git-dir=.* \. /, "-C " a[1] ".. ", line)
}
if (old[n++] != line) print old[n-1] " != " line
}'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>git fetch . in bare repositories1 parent ad141d4 commit e26e7ca
3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | | - | |
| 1378 | + | |
1379 | 1379 | | |
1380 | 1380 | | |
1381 | 1381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1829 | 1829 | | |
1830 | 1830 | | |
1831 | 1831 | | |
1832 | | - | |
1833 | | - | |
| 1832 | + | |
| 1833 | + | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| |||
0 commit comments