X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;fp=tests%2Flib;h=5fcb6f656b82497e2726638c7ae2523bc5245064;hp=d075bc763f0d05249b233294d64dd91bc6b7c0f7;hb=6b959bf443c37b26f058aed813885c469c660828;hpb=7a47622fe7b1a2d1db2f3cb917926e93c683dc2a diff --git a/tests/lib b/tests/lib index d075bc76..5fcb6f65 100644 --- a/tests/lib +++ b/tests/lib @@ -349,6 +349,25 @@ t-git-dir-check () { esac } +t-git-fsck () { + git fsck --no-dangling --strict || ${expect_fsck_fail-false} +} + +t-fscks () { + ( + shopt -s nullglob + for d in $tmp/*/.git $tmp/git/*.git; do + cd "$d" + t-git-fsck + done + ) +} + +t-ok () { + t-fscks + echo ok. +} + t-rm-dput-dropping () { rm -f $tmp/${p}_${v}_*.upload }