chiark / gitweb /
Merge tag dgit/2.14 into `defence in dgit-repos-server' branch
[dgit.git] / tests / lib
index d075bc7..5fcb6f6 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -349,6 +349,25 @@ t-git-dir-check () {
        esac
 }
 
        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
 }
 t-rm-dput-dropping () {
        rm -f $tmp/${p}_${v}_*.upload
 }