Windows: Avoid terminating git-annex branch lines with \r\n when union merging.
This commit is contained in:
parent
45308ec78b
commit
84f20c9f69
4 changed files with 26 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Git.HashObject where
|
||||
|
||||
import Common
|
||||
|
@ -39,6 +41,10 @@ hashFile h file = CoProcess.query h send receive
|
|||
- interface does not allow batch hashing without using temp files. -}
|
||||
hashBlob :: HashObjectHandle -> String -> IO Sha
|
||||
hashBlob h s = withTmpFile "hash" $ \tmp tmph -> do
|
||||
fileEncoding tmph
|
||||
#ifdef mingw32_HOST_OS
|
||||
hSetNewlineMode tmph noNewlineTranslation
|
||||
#endif
|
||||
hPutStr tmph s
|
||||
hClose tmph
|
||||
hashFile h tmp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue