diff options
Diffstat (limited to 'Git/Index.hs')
-rw-r--r-- | Git/Index.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Git/Index.hs b/Git/Index.hs index 5b660bb30..d9d5b03bf 100644 --- a/Git/Index.hs +++ b/Git/Index.hs @@ -7,6 +7,8 @@ module Git.Index where +import Common +import Git import Utility.Env {- Forces git to use the specified index file. @@ -19,9 +21,12 @@ import Utility.Env override :: FilePath -> IO (IO ()) override index = do res <- getEnv var - setEnv var index True - return $ reset res + void $ setEnv var index True + return $ void $ reset res where var = "GIT_INDEX_FILE" reset (Just v) = setEnv var v True reset _ = unsetEnv var + +indexFile :: Repo -> FilePath +indexFile r = localGitDir r </> "index" |