This fixes a bug in the assistant introduced by the literal pathspec changes in version 5.20150406.
git-checkignore refuses to work if any pathspec options are set. Urgh. I audited the rest of git, and no other commands used by git-annex have such limitations. Indeed, AFAICS, *all* other commands support --literal-pathspecs. So, worked around this where git-checkignore is called.
This commit is contained in:
parent
3695094454
commit
0f740fd198
3 changed files with 25 additions and 1 deletions
|
@ -31,10 +31,13 @@ type CheckIgnoreHandle = CoProcess.CoProcessHandle
|
|||
-
|
||||
- The first version of git to support what we need is 1.8.4.
|
||||
- Nothing is returned if an older git is installed.
|
||||
-
|
||||
- check-ignore does not support --literal-pathspecs, so remove that
|
||||
- from the gitGlobalOpts if set.
|
||||
-}
|
||||
checkIgnoreStart :: Repo -> IO (Maybe CheckIgnoreHandle)
|
||||
checkIgnoreStart repo = ifM supportedGitVersion
|
||||
( Just <$> (CoProcess.rawMode =<< gitCoProcessStart True params repo)
|
||||
( Just <$> (CoProcess.rawMode =<< gitCoProcessStart True params repo')
|
||||
, return Nothing
|
||||
)
|
||||
where
|
||||
|
@ -42,6 +45,9 @@ checkIgnoreStart repo = ifM supportedGitVersion
|
|||
[ Param "check-ignore"
|
||||
, Params "-z --stdin --verbose --non-matching"
|
||||
]
|
||||
repo' = repo { gitGlobalOpts = filter (not . pathspecs) (gitGlobalOpts repo) }
|
||||
pathspecs (Param "--literal-pathspecs") = True
|
||||
pathspecs _ = False
|
||||
|
||||
supportedGitVersion :: IO Bool
|
||||
supportedGitVersion = do
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -1,5 +1,7 @@
|
|||
git-annex (5.20150406.2) UNRELEASED; urgency=medium
|
||||
|
||||
* This fixes a bug in the assistant introduced by the literal pathspec
|
||||
changes in version 5.20150406.
|
||||
* --quiet now suppresses progress displays from eg, rsync.
|
||||
(Second time's the charm..)
|
||||
* fromkey, registerurl: When reading from stdin, allow the
|
||||
|
|
|
@ -78,3 +78,19 @@ fatal: Work/archive/Tidrapportering/Tid.md: pathspec magic not supported by this
|
|||
fatal: Work/archive/Tidrapportering/Tid.md: pathspec magic not supported by this command: 'literal'
|
||||
|
||||
"""]]
|
||||
|
||||
> I've fixed the pathspec magic problem. [[done]]
|
||||
>
|
||||
> Seems like you could possibly have a separate problem WRT the "commitBuffer:
|
||||
> invalid argument". When using the older version of git-annex, did you
|
||||
> get that in the log at all?
|
||||
>
|
||||
> OTOH, the
|
||||
> "@Projects/archive/20140515_METOCC_Gr������nsytem������te"
|
||||
> weirdness in the log could be where the problem chars are coming from
|
||||
> too, in which case it was somehow caused by the pathspec magic problem.
|
||||
>
|
||||
> I was able to reproduce the pathspec magic problem, but not the encoding
|
||||
> looking problem, even when using swedish chars in filenames.
|
||||
>
|
||||
> --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue