aboutsummaryrefslogtreecommitdiff
path: root/GitRepo.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:04:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-10 15:04:18 -0400
commitcc235192353561a374c431485c6c3834659e0fa6 (patch)
tree6c092eece822fea609a05acb92850669223c6508 /GitRepo.hs
parentf4d2a05e86df464790fb183148717e7ac7f49cda (diff)
update
Diffstat (limited to 'GitRepo.hs')
-rw-r--r--GitRepo.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/GitRepo.hs b/GitRepo.hs
index 8974d9db6..690782f0d 100644
--- a/GitRepo.hs
+++ b/GitRepo.hs
@@ -57,15 +57,22 @@ gitPrep repo = do
attributes <- gitAttributes repo
exists <- doesFileExist attributes
if (not exists)
- then writeFile attributes $ attrLine ++ "\n"
+ then do
+ writeFile attributes $ attrLine ++ "\n"
+ gitAdd repo attributes
else do
content <- readFile attributes
if (all (/= attrLine) (lines content))
then do
appendFile attributes $ attrLine ++ "\n"
- -- TODO check attributes file into git?
+ gitAdd repo attributes
else return ()
+{- Stages a changed file in git's index. -}
+gitAdd repo file = do
+ -- TODO
+ return ()
+
{- Finds the top of the current git repository, which may be in a parent
- directory. -}
repoTop :: IO GitRepo