summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorJed Brown <jed@59A2.org>2014-05-25 22:44:48 -0600
committerJed Brown <jed@59A2.org>2014-05-25 22:47:53 -0600
commit41fbd824da3c928df416398d2c71d7a237945d76 (patch)
treecbe02033dd769ecfb3fe51ceeae4bd47616d8980 /test.sh
parent6b01b1a7080e3aad3b6c19e3938d83a3168cfd4e (diff)
parent6ca25da37333bbffe10cbb837c0002fd250931b1 (diff)
downloadgit-fat-41fbd824da3c928df416398d2c71d7a237945d76.tar.gz
Merge branch 'add_verify_command' of github:jmurty/git-fat (PR #36)
* 'add_verify_command' of github:jmurty/git-fat: Add `verify` command to check git-fat object data matches hash filename. Conflicts: git-fat
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.sh b/test.sh
index 33c6d66..0ee63ea 100755
--- a/test.sh
+++ b/test.sh
@@ -54,3 +54,11 @@ git commit -m'add d with normal content'
rm d
git fat pull
+# Check verify command finds corrupt object
+mv .git/fat/objects/6ecec2e21d3033e7ba53e2db63f69dbd3a011fa8 \
+ .git/fat/objects/6ecec2e21d3033e7ba53e2db63f69dbd3a011fa8.bak
+echo "Not the right data" > .git/fat/objects/6ecec2e21d3033e7ba53e2db63f69dbd3a011fa8
+git fat verify && true
+if [ $? -eq 0 ]; then echo "Verify did not detect invalid object"; exit 1; fi
+mv .git/fat/objects/6ecec2e21d3033e7ba53e2db63f69dbd3a011fa8.bak \
+ .git/fat/objects/6ecec2e21d3033e7ba53e2db63f69dbd3a011fa8