avoid git warning about CRLF in restagePointerFile
Saw it on Windows, could probably also happen on linux with some configuration. Since this is a pointer file, the warning does not apply.
This commit is contained in:
parent
1647b9c7a4
commit
1e95bc4fd1
2 changed files with 9 additions and 1 deletions
|
@ -27,6 +27,7 @@ import qualified Git.Env
|
||||||
import qualified Git
|
import qualified Git
|
||||||
import Git.Types
|
import Git.Types
|
||||||
import Git.FilePath
|
import Git.FilePath
|
||||||
|
import Git.Config
|
||||||
import Annex.HashObject
|
import Annex.HashObject
|
||||||
import Annex.InodeSentinal
|
import Annex.InodeSentinal
|
||||||
import Utility.FileMode
|
import Utility.FileMode
|
||||||
|
@ -203,7 +204,12 @@ restagePointerFile (Restage True) f orig = withTSDelta $ \tsd -> do
|
||||||
let updatetmpindex = do
|
let updatetmpindex = do
|
||||||
r' <- Git.Env.addGitEnv r Git.Index.indexEnv
|
r' <- Git.Env.addGitEnv r Git.Index.indexEnv
|
||||||
=<< Git.Index.indexEnvVal tmpindex
|
=<< Git.Index.indexEnvVal tmpindex
|
||||||
Git.UpdateIndex.refreshIndex r' $ \feed ->
|
-- Avoid git warning about CRLF munging.
|
||||||
|
let r'' = r' { gitGlobalOpts = gitGlobalOpts r' ++
|
||||||
|
[ Param "-c"
|
||||||
|
, Param $ "core.safecrlf=" ++ boolConfig False
|
||||||
|
] }
|
||||||
|
Git.UpdateIndex.refreshIndex r'' $ \feed ->
|
||||||
forM_ l $ \(f', checkunmodified) ->
|
forM_ l $ \(f', checkunmodified) ->
|
||||||
whenM checkunmodified $
|
whenM checkunmodified $
|
||||||
feed f'
|
feed f'
|
||||||
|
|
|
@ -27,3 +27,5 @@ returned Nothing which should not happen in this case.
|
||||||
|
|
||||||
So, the next step will be to build git-annex on Windows and instrument
|
So, the next step will be to build git-annex on Windows and instrument
|
||||||
`stageDirect` to work out which thing it depends on has broken..
|
`stageDirect` to work out which thing it depends on has broken..
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue