From 1ab3d7c81049e4ce7e8e47800e2ef1fecb3a9ab4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 14:57:01 -0400 Subject: [PATCH] Windows: Fix bug introduced in last release that caused files in the git-annex branch to have lines teminated with \r. --- Annex/Journal.hs | 7 ++++++- debian/changelog | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Annex/Journal.hs b/Annex/Journal.hs index dcd3779dec..4196a82256 100644 --- a/Annex/Journal.hs +++ b/Annex/Journal.hs @@ -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. -} diff --git a/debian/changelog b/debian/changelog index dd2583e3b6..790ee90d23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 29 May 2014 20:10:59 -0400