diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-26 23:07:11 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-26 23:07:11 -0400 |
commit | 6f45827fe07262f93f39ae420f4362bfa0246194 (patch) | |
tree | 53cd64750e9c9618dee53cedf18f7f1a0c9019fd /Git | |
parent | 1093d82f6b6fb7844ca11b136f03767ca4460a98 (diff) |
git-config fileEncoding
Accept arbitrarily encoded repository filepaths etc when reading git config
output. This fixes support for remotes with unusual characters in their
names.
For example, a remote with a url of /tmp/çüş was previously
skipped, because the filename wasn't encoded right so it didn't think it
was available. And when setting the annex-uuid of a remote named "çüş",
it used to add it under a mis-encoded form of the remote's name. Both these
cases now work ok in my testing.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Config.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Git/Config.hs b/Git/Config.hs index dab1cdf5e..c9e4f9a2d 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -54,6 +54,10 @@ read' repo = go repo {- Reads git config from a handle and populates a repo with it. -} hRead :: Repo -> Handle -> IO Repo hRead repo h = do + -- We use the FileSystemEncoding when reading from git-config, + -- because it can contain arbitrary filepaths (and other strings) + -- in any encoding. + fileEncoding h val <- hGetContentsStrict h store val repo |