summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-15 22:10:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-15 22:10:49 -0400
commitc4210108977588a63a18916a222ee91a23f92ba6 (patch)
treec20d4b7e570d394bbdea9c5eaad590d002bde1d0
parent31b0ab6e1ee9695e2ea94383be3e0cf6dc54da9f (diff)
fix test
-rw-r--r--Test.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/Test.hs b/Test.hs
index ad7c57b79..df21e18a1 100644
--- a/Test.hs
+++ b/Test.hs
@@ -364,17 +364,13 @@ test_edit env = "git-annex edit/commit" ~: TestList [t False, t True]
git_annex env "edit" [annexedfile] @? "edit failed"
unannexed annexedfile
changecontent annexedfile
+ boolSystem "git" [Param "add", File annexedfile]
+ @? "git add of edited file failed"
if precommit
- then do
- -- pre-commit depends on the file being
- -- staged, normally git commit does this
- boolSystem "git" [Param "add", File annexedfile]
- @? "git add of edited file failed"
- git_annex env "pre-commit" []
- @? "pre-commit failed"
- else do
- boolSystem "git" [Params "commit -q -m contentchanged"]
- @? "git commit of edited file failed"
+ then git_annex env "pre-commit" []
+ @? "pre-commit failed"
+ else boolSystem "git" [Params "commit -q -m contentchanged"]
+ @? "git commit of edited file failed"
runchecks [checklink, checkunwritable] annexedfile
c <- readFile annexedfile
assertEqual "content of modified file" c (changedcontent annexedfile)