commit - c2105d002a73e60c6f3194dd96a1a0b09eb34e08
commit + f0fd0aafb69cafd7c84dd294cffda4b3c1d6144a
blob - fbd40bcace0448588f375c648b957b069821ab5f
blob + 260f6406dd2eba1355d668e2c054b7f09f9f1ee5
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
maybe_pack_repo $repo
}
+git_fsck()
+{
+ local testroot="$1"
+ local repo="$2"
+
+ (cd $repo && git fsck --strict \
+ > $testroot/fsck.stdout 2> $testroot/fsck.stderr)
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ echo -n "git fsck: "
+ cat $testroot/fsck.stderr
+ echo "git fsck failed; leaving test data in $testroot"
+ return 1
+ fi
+
+ return 0
+}
+
make_test_tree()
{
repo="$1"
{
local testroot="$1"
- (cd $testroot/repo && git fsck --strict \
- > $testroot/fsck.stdout 2> $testroot/fsck.stderr)
+ git_fsck $testroot $testroot/repo
ret="$?"
if [ "$ret" != "0" ]; then
- echo -n "git fsck: "
- cat $testroot/fsck.stderr
- echo "git fsck failed; leaving test data in $testroot"
- return 1
+ return $ret
fi
rm -rf "$testroot"
blob - eb88e75caf53cdb64f76ece8d89df60b00089758
blob + 5fdd09a2185f5b0ec3129d8c2ff58780671c2b0a
--- regress/cmdline/send.sh
+++ regress/cmdline/send.sh
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stderr.expected $testroot/stderr
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
test_done "$testroot" "1"
return 1
fi
- test_done "$testroot" "0"
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
+ test_done "$testroot" "$ret"
}
test_send_tag_of_deleted_branch() {
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo2"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
+ test_done "$testroot" "$ret"
+ return 1
fi
+
+ git_fsck "$testroot" "$testroot/repo-clone"
+ ret="$?"
test_done "$testroot" "$ret"
}