use git command queue

This commit is contained in:
Joey Hess 2010-10-26 16:15:29 -04:00
parent ef26076a5a
commit 24ee4439d4
3 changed files with 16 additions and 15 deletions

View file

@ -82,12 +82,14 @@ instance Read LogLine where
undefined = ret $ LogLine (0) Undefined ""
ret v = [(v, "")]
{- Log a change in the presence of a key's value in a repository. -}
logChange :: Git.Repo -> Key -> UUID -> LogStatus -> IO ()
{- Log a change in the presence of a key's value in a repository,
- and returns the filename of the logfile. -}
logChange :: Git.Repo -> Key -> UUID -> LogStatus -> IO (FilePath)
logChange repo key uuid status = do
log <- logNow status uuid
ls <- readLog logfile
writeLog logfile (compactLog $ log:ls)
return logfile
where
logfile = logFile repo key