Windows: Deal with strange msysgit 1.8.4 behavior of not understanding DOS formatted paths for --git-dir and --work-tree.
This commit is contained in:
parent
342d508e00
commit
e93206e294
3 changed files with 16 additions and 2 deletions
|
@ -5,6 +5,8 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Git.Command where
|
module Git.Command where
|
||||||
|
|
||||||
import System.Process (std_out, env)
|
import System.Process (std_out, env)
|
||||||
|
@ -18,10 +20,16 @@ import qualified Utility.CoProcess as CoProcess
|
||||||
gitCommandLine :: [CommandParam] -> Repo -> [CommandParam]
|
gitCommandLine :: [CommandParam] -> Repo -> [CommandParam]
|
||||||
gitCommandLine params Repo { location = l@(Local _ _ ) } = setdir : settree ++ params
|
gitCommandLine params Repo { location = l@(Local _ _ ) } = setdir : settree ++ params
|
||||||
where
|
where
|
||||||
setdir = Param $ "--git-dir=" ++ gitdir l
|
setdir = Param $ "--git-dir=" ++ gitpath (gitdir l)
|
||||||
settree = case worktree l of
|
settree = case worktree l of
|
||||||
Nothing -> []
|
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"
|
gitCommandLine _ repo = assertLocal repo $ error "internal"
|
||||||
|
|
||||||
{- Runs git in the specified repo. -}
|
{- Runs git in the specified repo. -}
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -29,6 +29,8 @@ git-annex (4.20131003) UNRELEASED; urgency=low
|
||||||
* assistant: Bug fix: When run in a subdirectory, files from incoming merges
|
* assistant: Bug fix: When run in a subdirectory, files from incoming merges
|
||||||
were wrongly added to that subdirectory, and removed from their original
|
were wrongly added to that subdirectory, and removed from their original
|
||||||
locations.
|
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
|
-- Joey Hess <joeyh@debian.org> Thu, 03 Oct 2013 15:41:24 -0400
|
||||||
|
|
||||||
|
|
|
@ -57,3 +57,7 @@ upgrade supported from repository versions: 2
|
||||||
|
|
||||||
### Please provide any additional information below.
|
### Please provide any additional information below.
|
||||||
C:\Users\Bruno\annex\.git\config exists
|
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]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue