summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorJames Murty <james@murty.co>2014-05-23 16:20:30 +0100
committerJames Murty <james@murty.co>2014-05-23 16:20:30 +0100
commit9f52324add1a4ededc8f47d11e90216f40cab497 (patch)
tree6732d80979632f40ba3f50a99134095736f6e701 /test.sh
parent456d22cb3c7ba60e15d5d0f7de771c2acf573481 (diff)
downloadgit-fat-9f52324add1a4ededc8f47d11e90216f40cab497.tar.gz
Fail with a clear error if 'git fat pull' is run on uninitialised repo.
This fixes issue #25 in the original project.
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test.sh b/test.sh
index e9c9163..a5ff2f6 100755
--- a/test.sh
+++ b/test.sh
@@ -2,6 +2,9 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
+# Clear out repos and fat store from prior test runs
+rm -fR fat-test fat-test2 /tmp/fat-store
+
git init fat-test
cd fat-test
git fat init
@@ -29,6 +32,13 @@ git fat push
cd ..
git clone fat-test fat-test2
cd fat-test2
+# Pull should fail in repo not yet init'ed for git-fat
+git fat pull -- 'a.fa*' && true
+if [ $? -eq 0 ]
+then
+ echo 'ERROR: "git fat pull" in uninitialised repo should fail'
+ exit 1
+fi
git fat init
git fat pull -- 'a.fa*'
cat a.fat