Added --no-check-gitignore option for finer grained control than using --force.
authorJoey Hess <joeyh@joeyh.name>
Fri, 18 Sep 2020 17:12:04 +0000 (13:12 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 18 Sep 2020 17:19:13 +0000 (13:19 -0400)
commitd0b06c17c0f491e254bb9d5941bb5b06b199d6d3
tree1a26a04f544fb664c480d3206140d27017d61ee4
parent500454935f342dd2bafd7670dadf152476da1c73
Added --no-check-gitignore option for finer grained control than using --force.

add, addurl, importfeed, import: Added --no-check-gitignore option
for finer grained control than using --force.

(--force is used for too many different things, and at least one
of these also uses it for something else. I would like to reduce
--force's footprint until it only forces drops or a few other data
losses. For now, --force still disables checking ignores too.)

addunused: Don't check .gitignores when adding files. This is a behavior
change, but I justify it by analogy with git add of a gitignored file
adding it, asking to add all unused files back should add them all back,
not skip some. The old behavior was surprising.

In Command.Lock and Command.ReKey, CheckGitIgnore False does not change
behavior, it only makes explicit what is done. Since these commands are run
on annexed files, the file is already checked into git, so git add won't
check ignores.
15 files changed:
Annex/CheckIgnore.hs
Annex/Ingest.hs
Assistant/Threads/Watcher.hs
CHANGELOG
Command/Add.hs
Command/AddUnused.hs
Command/AddUrl.hs
Command/Import.hs
Command/ImportFeed.hs
Command/Lock.hs
Command/ReKey.hs
doc/git-annex-add.mdwn
doc/git-annex-addurl.mdwn
doc/git-annex-import.mdwn
doc/git-annex-importfeed.mdwn