Windows: Fix bug introduced in last release that caused files in the git-annex branch to have lines teminated with \r.

This commit is contained in:
Joey Hess 2014-06-05 14:57:01 -04:00
parent d69c78483c
commit 1ab3d7c810
2 changed files with 8 additions and 1 deletions

View file

@ -40,7 +40,12 @@ setJournalFile _jl file content = do
jfile <- fromRepo $ journalFile file
let tmpfile = tmp </> takeFileName jfile
liftIO $ do
writeFileAnyEncoding tmpfile content
withFile tmpfile WriteMode $ \h -> do
fileEncoding h
#ifdef mingw32_HOST_OS
hSetNewlineMode h noNewlineTranslation
#endif
hPutStr h content
moveFile tmpfile jfile
{- Gets any journalled content for a file in the branch. -}

2
debian/changelog vendored
View file

@ -9,6 +9,8 @@ git-annex (5.20140530) UNRELEASED; urgency=medium
* assistant: Make sanity checker tmp dir cleanup code more robust.
* unused: Avoid checking view branches for unused files.
* webapp: Include ssh port in mangled hostname.
* Windows: Fix bug introduced in last release that caused files
in the git-annex branch to have lines teminated with \r.
-- Joey Hess <joeyh@debian.org> Thu, 29 May 2014 20:10:59 -0400