annex.skipunknown with transition plan
Added annex.skipunknown git config, that can be set to false to change the behavior of commands like `git annex get foo*`, to not skip over files/dirs that are not checked into git and are explicitly listed in the command line. Significant complexity was needed to handle git-annex add, which uses some git ls-files calls, but needs to not use --error-unmatch because of course the files are not known to git. annex.skipunknown is planned to change to default to false in a git-annex release in early 2022. There's a todo for that.
This commit is contained in:
parent
5b28a37ea1
commit
89b2542d3c
42 changed files with 271 additions and 169 deletions
|
@ -75,15 +75,16 @@ seek :: MetaDataOptions -> CommandSeek
|
|||
seek o = case batchOption o of
|
||||
NoBatch -> do
|
||||
c <- liftIO currentVectorClock
|
||||
let ww = WarnUnmatchLsFiles
|
||||
let seeker = case getSet o of
|
||||
Get _ -> withFilesInGit
|
||||
GetAll -> withFilesInGit
|
||||
Set _ -> withFilesInGitNonRecursive
|
||||
Get _ -> withFilesInGit ww
|
||||
GetAll -> withFilesInGit ww
|
||||
Set _ -> withFilesInGitNonRecursive ww
|
||||
"Not recursively setting metadata. Use --force to do that."
|
||||
withKeyOptions (keyOptions o) False
|
||||
(commandAction . startKeys c o)
|
||||
(seeker (commandAction . (whenAnnexed (start c o))))
|
||||
=<< workTreeItems (forFiles o)
|
||||
=<< workTreeItems ww (forFiles o)
|
||||
Batch fmt -> withMessageState $ \s -> case outputType s of
|
||||
JSONOutput _ -> ifM limited
|
||||
( giveup "combining --batch with file matching options is not currently supported"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue