diff options
author | Jed Brown <jed@59A2.org> | 2014-05-25 21:05:29 -0600 |
---|---|---|
committer | Jed Brown <jed@59A2.org> | 2014-05-25 21:05:29 -0600 |
commit | 6b01b1a7080e3aad3b6c19e3938d83a3168cfd4e (patch) | |
tree | ab3d8ce95199e02d9816c1bfcb4e85dcf81bcce8 /test.sh | |
parent | 456d22cb3c7ba60e15d5d0f7de771c2acf573481 (diff) | |
parent | b1af5996fd2b1fc5eb21bab2d2477095f72ffa27 (diff) | |
download | git-fat-6b01b1a7080e3aad3b6c19e3938d83a3168cfd4e.tar.gz |
Merge branch 'jmurty/ensure-init-before-pull' (PR #33)
* jmurty/ensure-init-before-pull:
Print fatal error message to stderr
Moved requirement for init to `checkout` operation.
Fail with a clear error if 'git fat pull' is run on uninitialised repo.
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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,19 @@ git fat push cd .. git clone fat-test fat-test2 cd fat-test2 +# checkout and pull should fail in repo not yet init'ed for git-fat +git fat checkout && true +if [ $? -eq 0 ] +then + echo 'ERROR: "git fat checkout" in uninitialised repo should fail' + exit 1 +fi +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 |