git-annex/Command
Joey Hess ec08b66bda
shouldAnnex: check isInodeKnown
Renamed unlocked files are now detected, and will always be
annexed, unless annex.largefiles disallows it.

This allows for git add's behavior to later be changed to otherwise
not annex files (whether by default or as a config option), without
worrying about the rename case.

This is not a major behavior change; annexing is still the default. But
there is one case where the behavior is changed, I think for the better:

	touch f
	git -c annex.largefiles=nothing add f
	git add bigfile
	git commit -m ...
	mv bigfile f
	git add f

Before, git-annex would see that f was previously not annexed,
and so the renamed bigfile content gets added to git. Now, it notices
that the inode is the one that bigfile used, and so it annexes it.

This potentially slows down git add a lot in some repositories because
of the poor performance of isInodeKnown when there are a lot of unlocked
files. Configuring annex.largefiles avoids the speed hit.
2019-10-23 14:49:45 -04:00
..
Add.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
AddUnused.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
AddUrl.hs plumb MeterUpdate into getKey 2019-06-25 11:43:24 -04:00
Adjust.hs adjust --lock: This enters an adjusted branch where files are locked. 2019-09-27 14:23:25 -04:00
Assistant.hs remotedaemon: Don't list --stop in help since it's not supported. 2019-09-30 14:40:46 -04:00
Benchmark.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CalcKey.hs plumb MeterUpdate into getKey 2019-06-25 11:43:24 -04:00
CheckPresentKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Commit.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Config.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
ConfigList.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ContentLocation.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Copy.hs make WorkerStage an open type 2019-06-19 13:05:03 -04:00
Dead.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Describe.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
DiffDriver.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
Direct.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
Drop.hs remove obsolete comment 2019-10-21 13:51:38 -04:00
DropKey.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
DropUnused.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
EnableRemote.hs autoenable sameas remotes 2019-10-11 15:52:40 -04:00
EnableTor.hs remove recently added and unncessary cwd parameter 2019-10-21 13:48:52 -04:00
ExamineKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Expire.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Export.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Find.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
FindRef.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Fix.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Forget.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
FromKey.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Fsck.hs fix bug introduced in direct mode conversion 2019-08-27 12:29:05 -04:00
FuzzTest.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
GCryptSetup.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Get.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
Group.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
GroupWanted.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
Help.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs plumb MeterUpdate into getKey 2019-06-25 11:43:24 -04:00
ImportFeed.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
InAnnex.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Indirect.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
Info.hs info: Display trust level when getting info on a uuid, same as on a remote. 2019-09-01 16:48:46 -04:00
Init.hs have init --version fail when repo is already initialized with other version 2019-08-08 14:13:02 -04:00
InitRemote.hs autoenable sameas remotes 2019-10-11 15:52:40 -04:00
Inprogress.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
List.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Lock.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
LockContent.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Log.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
LookupKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Map.hs add startingNoMessage 2019-06-12 14:11:23 -04:00
MatchExpression.hs support standard and groupwanted in keyless mode 2019-05-14 14:59:03 -04:00
Merge.hs typo 2019-08-13 13:36:52 -04:00
MetaData.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
Migrate.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Mirror.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
Move.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
Multicast.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
NotifyChanges.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
NumCopies.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
P2P.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
P2PStdIO.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
PostReceive.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
PreCommit.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Proxy.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
ReadPresentKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RecvKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RegisterUrl.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Reinit.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Reinject.hs plumb MeterUpdate into getKey 2019-06-25 11:43:24 -04:00
ReKey.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
RemoteDaemon.hs remotedaemon: Don't list --stop in help since it's not supported. 2019-09-30 14:40:46 -04:00
RenameRemote.hs autoenable sameas remotes 2019-10-11 15:52:40 -04:00
Repair.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Required.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ResolveMerge.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
RmUrl.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Schedule.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
Semitrust.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
SendKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
SetKey.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
SetPresentKey.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Smudge.hs shouldAnnex: check isInodeKnown 2019-10-23 14:49:45 -04:00
Status.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Sync.hs post-receive hook updateInstead emulation cleanup 2019-09-11 14:41:51 -04:00
Test.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
TestRemote.hs add RemoteStateHandle 2019-10-14 13:51:42 -04:00
TransferInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
TransferKey.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
TransferKeys.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Trust.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Unannex.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Undo.hs fix a couple warnings 2019-08-27 12:24:31 -04:00
Ungroup.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00
Uninit.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
Unlock.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Untrust.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Unused.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
Upgrade.hs Added annex.autoupgraderepository configuration 2019-09-01 13:42:26 -04:00
VAdd.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
VCycle.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Version.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
VFilter.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Vicfg.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
View.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
VPop.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Wanted.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
Watch.hs remotedaemon: Don't list --stop in help since it's not supported. 2019-09-30 14:40:46 -04:00
WebApp.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Whereis.hs make CommandStart return a StartMessage 2019-06-06 17:13:54 -04:00