summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-02 19:32:51 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-03 22:41:51 +0100
commit090071ae8e31c8f81283af477c1114835ed8fd02 (patch)
treee2e5744132c62851b00508a9985819c7462492ae /tests
parent98ff9fa866eecd50ce444ea7a506db894f2b5fac (diff)
test suite: Tolerate worktrees when trying to git-fsck
A `git worktree' has a file for .git. We still want to fsck them. We can simply run the fsck in the directory containing .git, instead. That works for ordinary trees with a .git directory, and for worktrees. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib b/tests/lib
index 3c04155..4f268fc 100644
--- a/tests/lib
+++ b/tests/lib
@@ -389,7 +389,7 @@ t-fscks () {
(
shopt -s nullglob
for d in $tmp/*/.git $tmp/git/*.git; do
- cd "$d"
+ cd "${d%/.git}"
t-git-fsck
done
)