git-annex/Types
Joey Hess 4588668a12
fromkey unlocked files support
fromkey: Create an unlocked file when used in an adjusted branch where the
file should be unlocked, or when configured by annex.addunlocked.

There is some overlap with code in Annex.Ingest, however it's not quite the
same because ingesting has a temp file with the content, where here the
content, if any, is in the annex object file. So it eg, makes sense for
Annex.Ingest to copy the execute mode of the content file, but it does not make
sense for fromkey to do that.

Also changed in passing to stage the file in git directly, rather than
using git add. One consequence of that is that if the file is gitignored,
it will still get added, rather than the old behavior:

The following paths are ignored by one of your .gitignore files:
ignored
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
git-annex: user error (xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","add","--"] exited 123)

That old behavior was a surprise to me, and so I consider it a bug, and doubt
anyone would have relied on it.

Note that, when on an --hide-missing branch, it is possible to fromkey a key
that is not present (needs --force). The annex link or pointer file still gets
written in this case. It doesn't seem to make any sense not to write it,
because then fromkey would not do anything useful in this case, and this way
the file can be committed and synced to master, and the branch re-adjusted to
hide the new missing file.

This commit was sponsored by Noam Kremen on Patreon.
2021-05-03 11:26:18 -04:00
..
ActionItem.hs export --json: Fill in the file field 2021-03-12 14:11:31 -04:00
AdjustedBranch.hs make sync update --unlock-present branch 2020-11-13 15:04:34 -04:00
Availability.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Backend.hs add incremental hashing interface to Backend 2021-02-09 15:00:51 -04:00
Benchmark.hs benchmark: Add --databases to benchmark sqlite databases 2019-10-29 16:59:27 -04:00
BranchState.hs cache one more log file for metadata 2020-07-07 14:18:55 -04:00
CatFileHandles.hs cat-file resource pool 2020-04-20 15:19:31 -04:00
CleanupActions.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
Command.hs addon commands 2021-02-02 16:32:49 -04:00
Concurrency.hs differentiate between concurrency enabled at command line and by git config 2020-09-16 11:47:12 -04:00
Creds.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Crypto.hs remove Show Cipher 2020-09-01 18:11:22 -04:00
DeferredParse.hs implement fastDebug 2021-04-06 15:24:28 -04:00
DesktopNotify.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Difference.hs annex.addunlocked expressions 2019-12-20 15:56:25 -04:00
Distribution.hs annex.addunlocked expressions 2019-12-20 15:56:25 -04:00
Export.hs deepseq all things returned from ResourceT http 2020-09-14 18:30:06 -04:00
FileMatcher.hs fromkey unlocked files support 2021-05-03 11:26:18 -04:00
GitConfig.hs git-annex-config: Allow setting annex.securehashesonly 2021-04-26 13:50:37 -04:00
Group.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs notes on ImportableContents history not being used for retrieval 2020-12-22 11:24:11 -04:00
IndexFiles.hs cache annex index filename for 1.5% speedup to queries 2020-04-10 13:37:04 -04:00
Key.hs new protocol for transferkeys, with message serialization 2020-12-03 16:21:20 -04:00
KeySource.hs convert KeySource to RawFilePath 2020-02-21 10:04:44 -04:00
Link.hs prep for fixing find --branch --unlocked 2021-03-02 13:39:31 -04:00
LockCache.hs more RawFilePath conversion 2020-10-29 10:50:29 -04:00
Messages.hs simplify transferr protocol 2020-12-11 12:52:22 -04:00
MetaData.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Mime.hs Added mimeencoding= term to annex.largefiles expressions. 2019-04-30 12:17:22 -04:00
NumCopies.hs check mincopies is satisfied even when numcopies is known to be satisfied 2021-04-27 13:37:18 -04:00
ProposedAccepted.hs separate RemoteConfig parsing basically working 2020-01-14 12:35:08 -04:00
RefSpec.hs Windows: include= and exclude= containing '/' will also match filenames that are written using '\' 2020-12-15 12:39:34 -04:00
Remote.hs webdav: deal with buggy webdav servers in renameExport 2021-03-22 13:08:18 -04:00
RemoteConfig.hs GETCONFIG name fix 2020-03-09 12:38:04 -04:00
RemoteState.hs improve comment 2020-01-06 12:53:09 -04:00
RepoVersion.hs
ScheduledActivity.hs avoid using MonadFail in ParseDuration 2020-08-15 15:53:35 -04:00
StallDetection.hs suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
StandardGroups.hs a few forgotten remote config fields 2020-01-15 11:22:36 -04:00
StoreRetrieve.hs make removeKey throw exceptions 2020-05-14 14:11:05 -04:00
Test.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Transfer.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Transferrer.hs simplify transferr protocol 2020-12-11 12:52:22 -04:00
TransferrerPool.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
TrustLevel.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
UrlContents.hs remove SafeFilePath 2020-05-11 14:04:56 -04:00
UUID.hs support boolean git configs that are represented by the name of the setting with no value 2020-04-13 13:35:22 -04:00
VectorClock.hs generate more compact git-annex branch for imports 2020-12-23 15:25:16 -04:00
View.hs test: Fix some test cases that assumed git's default branch name 2020-06-23 16:40:51 -04:00
WorkerPool.hs improve transfer stages for some commands 2020-05-26 11:55:50 -04:00