summaryrefslogtreecommitdiff
path: root/GitRepo.hs
diff options
context:
space:
mode:
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