git-annex/Command
Joey Hess 5a98f2d509
avoid creating content directory when locking content
If the content directory does not exist, then it does not make sense to
lock the content file, as it also does not exist, and so it's ok for the
lock operation to fail.

This avoids potential races where the content file exists but is then
deleted/renamed, while another process sees that it exists and goes to
lock it, resulting in a dangling lock file in an otherwise empty object
directory.

Also renamed modifyContent to modifyContentDir since it is not only
necessarily used for modifying content files, but also other files in
the content directory.

Sponsored-by: Dartmouth College's Datalad project
2022-05-16 12:34:56 -04:00
..
Add.hs fix reversion 2022-03-21 15:54:04 -04:00
AddUnused.hs more RawFilePath conversion 2020-11-03 10:11:04 -04:00
AddUrl.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Adjust.hs rename to --unlock-present and better reverse adjusting 2020-11-13 14:56:43 -04:00
Assistant.hs add searchPathContents 2021-02-02 19:06:15 -04:00
Benchmark.hs
CalcKey.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
CheckPresentKey.hs --batch-keys 2021-08-25 14:21:12 -04:00
Config.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
ConfigList.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
ContentLocation.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Copy.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Dead.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Describe.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
DiffDriver.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Direct.hs
Drop.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
DropKey.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
DropUnused.hs dropping unused marks as dead 2021-06-25 15:22:26 -04:00
EnableRemote.hs enableremote: Better handling of the unusual case where multiple special remotes have been initialized with the same name 2022-01-05 15:12:11 -04:00
EnableTor.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
ExamineKey.hs examinekey: Added a "file" format variable 2020-11-16 09:59:11 -04:00
Expire.hs Future proof activity log parsing 2021-06-14 14:18:19 -04:00
Export.hs avoid exporting non-annexed symlinks 2022-01-03 14:21:50 -04:00
FilterBranch.hs handle transitions with read-only unmerged git-annex branches 2021-12-28 13:23:32 -04:00
FilterProcess.hs smudge: Warn when encountering a pointer file that has other content appended to it 2022-02-23 15:17:08 -04:00
Find.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
FindRef.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Fix.hs avoid creating content directory when locking content 2022-05-16 12:34:56 -04:00
Forget.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
FromKey.hs registerurl,unregisterurl: rework output and support --json 2022-02-14 13:29:20 -04:00
Fsck.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
FuzzTest.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
GCryptSetup.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Get.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Group.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
GroupWanted.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Help.hs
Import.hs shorten synopsis 2021-11-04 14:33:07 -04:00
ImportFeed.hs handle overBranchFileContents with read-only unmerged git-annex branches 2021-12-27 14:30:51 -04:00
InAnnex.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Indirect.hs
Info.hs rename memoryUnits 2022-05-05 15:35:11 -04:00
Init.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
InitRemote.hs renameremote: Better handling of case where there are multiple special remotes with a name 2022-01-05 15:24:02 -04:00
Inprogress.hs more RawFilePath conversion 2020-11-02 16:31:28 -04:00
List.hs add "input" field to json output 2020-09-15 16:22:44 -04:00
Lock.hs avoid creating content directory when locking content 2022-05-16 12:34:56 -04:00
Log.hs prevent git-annex log with read-only unmerged git-annex branches 2021-12-27 15:44:15 -04:00
LookupKey.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Map.hs avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
MatchExpression.hs split ProvidedInfo and UserProvidedInfo 2020-09-28 12:12:38 -04:00
Merge.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
MetaData.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Migrate.hs move code from Command.Fsck 2022-01-13 13:24:50 -04:00
MinCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Mirror.hs dropping unused marks as dead 2021-06-25 15:22:26 -04:00
Move.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Multicast.hs multicast: Support uftp 5.0 by switching from aes256-cbc to aes256-gcm 2022-04-19 12:02:10 -04:00
NotifyChanges.hs
NumCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
P2P.hs complete the magic wormhole pairin appid transition 2021-12-30 12:16:22 -04:00
P2PStdIO.hs
PostReceive.hs remove direct mode remnant of merging unrelated histories 2021-07-19 11:41:26 -04:00
PreCommit.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Proxy.hs
ReadPresentKey.hs
RecvKey.hs remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
RegisterUrl.hs registerurl,unregisterurl: rework output and support --json 2022-02-14 13:29:20 -04:00
Reinit.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
Reinject.hs split verifyKeyContent 2021-07-29 13:58:40 -04:00
ReKey.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
RemoteDaemon.hs assistant: Fix a crash on startup by avoiding using forkProcess 2021-05-12 15:08:03 -04:00
RenameRemote.hs renameremote: Better handling of case where there are multiple special remotes with a name 2022-01-05 15:24:02 -04:00
Repair.hs finished this stage of the RawFilePath conversion 2020-11-06 14:10:58 -04:00
Required.hs
ResolveMerge.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
RmUrl.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Schedule.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Semitrust.hs
SendKey.hs remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
SetKey.hs annex.adjustedbranchrefresh 2020-11-16 14:27:28 -04:00
SetPresentKey.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Smudge.hs smudge: Warn when encountering a pointer file that has other content appended to it 2022-02-23 15:17:08 -04:00
Status.hs more RawFilePath conversion 2020-11-02 16:31:28 -04:00
Sync.hs improve sync message in export edge case 2021-12-23 14:45:01 -04:00
Test.hs
TestRemote.hs support incremental verification when retrieving from export/import remotes 2022-05-09 12:25:04 -04:00
TransferKey.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
TransferKeys.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Transferrer.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Trust.hs fix format of message 2021-01-11 13:14:09 -04:00
Unannex.hs remove inode cache in unannex 2021-05-12 11:09:38 -04:00
Undo.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
Ungroup.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Uninit.hs uninit edge cases 2021-11-08 16:47:00 -04:00
Unlock.hs restage pointer file after unlock 2022-02-18 14:55:52 -04:00
UnregisterUrl.hs registerurl,unregisterurl: rework output and support --json 2022-02-14 13:29:20 -04:00
Untrust.hs
Unused.hs info: Allow using matching options in more situations 2022-02-21 14:46:07 -04:00
Upgrade.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
VAdd.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
VCycle.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Version.hs fix spelling of upgradeable 2022-01-19 12:14:50 -04:00
VFilter.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Vicfg.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
View.hs more RawFilePath conversion 2020-10-30 15:55:59 -04:00
VPop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Wanted.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Watch.hs
WebApp.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
Whereis.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
WhereUsed.hs better key matching with a regexp 2021-07-14 16:31:17 -04:00