summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-30 00:35:51 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-30 00:35:51 -0400
commitd72fb5acc28af3ea6380dd09518f7d1382dea8d2 (patch)
treec7dfd77b45a98d0690f66f2a250770e763682255
parentb089fba7b4e68c4482909319f562d32a3f00f379 (diff)
Fix encoding of utf-8 etc when storing the description of repository and other content.
Write files in raw mode, to avoid mangling the encoding of content provided. Note: This was a longstanding problem, it was not introduced in v3.
-rw-r--r--Branch.hs3
-rw-r--r--debian/changelog2
2 files changed, 4 insertions, 1 deletions
diff --git a/Branch.hs b/Branch.hs
index 9cdb096fd..ab24e4752 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -26,6 +26,7 @@ import System.Cmd.Utils
import Data.Maybe
import Data.List
import System.IO
+import System.IO.Binary
import qualified Data.ByteString.Char8 as B
import Types.BranchState
@@ -287,7 +288,7 @@ setJournalFile file content = do
write g = do
let jfile = journalFile g file
let tmpfile = gitAnnexTmpDir g </> takeFileName jfile
- writeFile tmpfile content
+ writeBinaryFile tmpfile content
renameFile tmpfile jfile
{- Gets journalled content for a file in the branch. -}
diff --git a/debian/changelog b/debian/changelog
index a87a89860..f84f8ab49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ git-annex (3.20110625) UNRELEASED; urgency=low
* Sped back up fsck, copy --from, and other commands that often
have to read a lot of information from the git-annex branch. Should
now be nearly as fast as before the branch was introduced.
+ * Fix encoding of utf-8 etc when storing the description of repository
+ and other content.
-- Joey Hess <joeyh@debian.org> Sun, 26 Jun 2011 21:01:06 -0400