v7 for all repositories
* Default to v7 for new repositories. * Automatically upgrade v5 repositories to v7.
This commit is contained in:
parent
1558e03014
commit
3f0eef4baa
29 changed files with 127 additions and 482 deletions
16
Git/Index.hs
16
Git/Index.hs
|
@ -58,19 +58,3 @@ currentIndexFile r = fromMaybe (indexFile r) <$> getEnv indexEnv
|
|||
{- Git locks the index by creating this file. -}
|
||||
indexFileLock :: FilePath -> FilePath
|
||||
indexFileLock f = f ++ ".lock"
|
||||
|
||||
{- When the pre-commit hook is run, and git commit has been run with
|
||||
- a file or files specified to commit, rather than committing the staged
|
||||
- index, git provides the pre-commit hook with a "false index file".
|
||||
-
|
||||
- Changes made to this index will influence the commit, but won't
|
||||
- affect the real index file.
|
||||
-
|
||||
- This detects when we're in this situation, using a heuristic, which
|
||||
- might be broken by changes to git. Any use of this should have a test
|
||||
- case to make sure it works.
|
||||
-}
|
||||
haveFalseIndex :: IO Bool
|
||||
haveFalseIndex = maybe (False) check <$> getEnv indexEnv
|
||||
where
|
||||
check f = "next-index" `isPrefixOf` takeFileName f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue