diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-17 19:35:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-17 19:35:57 -0400 |
commit | e549a18c2fe5bfb83185afbc81d5b8f88363f842 (patch) | |
tree | f405a56e2673b7f906bc767fd89b0015f7dffeaf | |
parent | 58972e05e2b6f526668ff39d588bd43c5cef8e62 (diff) |
Windows: Deal with strange msysgit 1.8.4 behavior of not understanding DOS formatted paths for --git-dir and --work-tree.
3 files changed, 16 insertions, 2 deletions
diff --git a/Git/Command.hs b/Git/Command.hs index 2d68540e6..6fe75f1d4 100644 --- a/Git/Command.hs +++ b/Git/Command.hs @@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Git.Command where import System.Process (std_out, env) @@ -18,10 +20,16 @@ import qualified Utility.CoProcess as CoProcess gitCommandLine :: [CommandParam] -> Repo -> [CommandParam] gitCommandLine params Repo { location = l@(Local _ _ ) } = setdir : settree ++ params where - setdir = Param $ "--git-dir=" ++ gitdir l + setdir = Param $ "--git-dir=" ++ gitpath (gitdir l) settree = case worktree l of Nothing -> [] - Just t -> [Param $ "--work-tree=" ++ t] + Just t -> [Param $ "--work-tree=" ++ gitpath t] +#ifdef mingw32_HOST_OS + -- despite running on windows, msysgit wants a unix-formatted path + gitpath = dropDrive . toInternalGitPath +#else + gitpath = id +#endif gitCommandLine _ repo = assertLocal repo $ error "internal" {- Runs git in the specified repo. -} diff --git a/debian/changelog b/debian/changelog index e124c71d0..ed61eee1a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,8 @@ git-annex (4.20131003) UNRELEASED; urgency=low * assistant: Bug fix: When run in a subdirectory, files from incoming merges were wrongly added to that subdirectory, and removed from their original locations. + * Windows: Deal with strange msysgit 1.8.4 behavior of not understanding + DOS formatted paths for --git-dir and --work-tree. -- Joey Hess <joeyh@debian.org> Thu, 03 Oct 2013 15:41:24 -0400 diff --git a/doc/bugs/fatal:_unable_to_access___39__..__47__..__47__..__47__..__47__C:__92__Users__92____91__...__93____92__annex__92__.git__47__config__39__:_Invalid_argument___40__Windows__41__.mdwn b/doc/bugs/fatal:_unable_to_access___39__..__47__..__47__..__47__..__47__C:__92__Users__92____91__...__93____92__annex__92__.git__47__config__39__:_Invalid_argument___40__Windows__41__.mdwn index 05d984bd2..dae654d13 100644 --- a/doc/bugs/fatal:_unable_to_access___39__..__47__..__47__..__47__..__47__C:__92__Users__92____91__...__93____92__annex__92__.git__47__config__39__:_Invalid_argument___40__Windows__41__.mdwn +++ b/doc/bugs/fatal:_unable_to_access___39__..__47__..__47__..__47__..__47__C:__92__Users__92____91__...__93____92__annex__92__.git__47__config__39__:_Invalid_argument___40__Windows__41__.mdwn @@ -57,3 +57,7 @@ upgrade supported from repository versions: 2 ### Please provide any additional information below. C:\Users\Bruno\annex\.git\config exists + +> xargs was one problem; also msysgit seems to just not +> accept DOS style paths anymore in --git-dir or --git-work-tree. +> megaweird. [[fixed|done]] --[[Joey]] |