Commit graph

39863 commits

Author SHA1 Message Date
Joey Hess
78be7cf73f
remove warning about combining options
the option parser no longer allows combining --want-get/--want-drop with
options like --all
2021-05-24 13:53:28 -04:00
Joey Hess
d62d6e2fcf
note about a wart
All code that uses associated files already deals with this problem,
which used to be worse. Unfortunately I was not able to entirely
eliminate it, although it happens in fewer cases now.
2021-05-24 12:05:49 -04:00
Joey Hess
13423f337c
refactoring 2021-05-24 11:38:22 -04:00
Joey Hess
efae085272
fixed reconcileStaged crash when index is locked or in conflict
Eg, when git commit runs the smudge filter.

Commit 428c91606b introduced the crash,
as write-tree fails in those situations. Now it will work, and git-annex
always gets up-to-date information even in those situations. It does
need to do a bit more work, each time git-annex is run with the index
locked. Although if the index is unmodified from the last time
write-tree succeeded, that work is avoided.
2021-05-24 11:33:23 -04:00
Joey Hess
3698e804d4
Merge branch 'master' into trackassociated 2021-05-24 10:24:53 -04:00
Joey Hess
b81f5532c6
comment 2021-05-21 16:44:44 -04:00
Joey Hess
428c91606b
include locked files in the keys database associated files
Before only unlocked files were included.

The initial scan now scans for locked as well as unlocked files. This
does mean it gets a little bit slower, although I optimised it as well
as I think it can be.

reconcileStaged changed to diff from the current index to the tree of
the previous index. This lets it handle deletions as well, removing
associated files for both locked and unlocked files, which did not
always happen before.

On upgrade, there will be no recorded previous tree, so it will diff
from the empty tree to current index, and so will fully populate the
associated files, as well as removing any stale associated files
that were present due to them not being removed before.

reconcileStaged now does a bit more work. Most of the time, this will
just be due to running more often, after some change is made to the
index, and since there will be few changes since the last time, it will
not be a noticable overhead. What may turn out to be a noticable
slowdown is after changing to a branch, it has to go through the diff
from the previous index to the new one, and if there are lots of
changes, that could take a long time. Also, after adding a lot of files,
or deleting a lot of files, or moving a large subdirectory, etc.

Command.Lock used removeAssociatedFile, but now that's wrong because a
newly locked file still needs to have its associated file tracked.

Command.Rekey used removeAssociatedFile when the file was unlocked.
It could remove it also when it's locked, but it is not really
necessary, because it changes the index, and so the next time git-annex
run and accesses the keys db, reconcileStaged will run and update it.

There are probably several other places that use addAssociatedFile and
don't need to any more for similar reasons. But there's no harm in
keeping them, and it probably is a good idea to, if only to support
mixing this with older versions of git-annex.

However, mixing this and older versions does risk reconcileStaged not
running, if the older version already ran it on a given index state. So
it's not a good idea to mix versions. This problem could be dealt with
by changing the name of the gitAnnexKeysDbIndexCache, but that would
leave the old file dangling, or it would need to keep trying to remove
it.
2021-05-21 16:24:37 -04:00
Joey Hess
df0b75cdc4
complications 2021-05-21 14:18:38 -04:00
Joey Hess
1d9bad51d2
plan for these 2021-05-21 13:50:26 -04:00
Joey Hess
f39b7c3663
comment 2021-05-21 12:39:35 -04:00
Joey Hess
d5e18c8710
comment 2021-05-21 12:26:00 -04:00
Joey Hess
a26e7d763d
comment 2021-05-21 12:07:21 -04:00
Joey Hess
442398e1e0
comment 2021-05-21 11:48:57 -04:00
Joey Hess
414dc39a12
comment 2021-05-21 11:31:38 -04:00
Joey Hess
9dbbecc8f4
Merge branch 'master' of ssh://git-annex.branchable.com 2021-05-21 11:28:17 -04:00
Joey Hess
5393c0ae58
reopen per comment 2021-05-21 11:27:13 -04:00
Joey Hess
b68a40fa88
todo 2021-05-20 11:18:46 -04:00
Nick_P
588f8461cb Added a comment 2021-05-20 10:43:14 +00:00
Atemu
0b2c17b49b Added a comment 2021-05-19 17:13:45 +00:00
Nick_P
bfede8f92d Added a comment 2021-05-19 16:59:21 +00:00
Atemu
e9e3cc015e Added a comment 2021-05-19 16:54:19 +00:00
Joey Hess
84366fa2d0
fix by improving docs 2021-05-19 11:13:53 -04:00
Joey Hess
64e26287dd
comment 2021-05-19 11:07:02 -04:00
Joey Hess
901f1fc74c
comment 2021-05-19 10:55:35 -04:00
Nick_P
bff290d864 Added a comment 2021-05-19 14:35:43 +00:00
Nick_P
f7c99032d7 Added a comment 2021-05-19 14:29:23 +00:00
strmd
84ceedb263 Added a comment 2021-05-19 07:00:58 +00:00
strmd
131208bb72 2021-05-19 06:56:34 +00:00
strmd
2ade910ca6 Added a comment 2021-05-19 06:33:03 +00:00
Nick_P
2dbe699b78 2021-05-18 17:35:33 +00:00
Atemu
94fb769e76 removed 2021-05-18 17:16:12 +00:00
Atemu
48314f625f Added a comment 2021-05-18 16:23:09 +00:00
Atemu
4a76ba8761 Forgot the assistant needed for repro 2021-05-18 16:16:56 +00:00
yarikoptic
674f33c139 todo for extra logging when content changed 2021-05-18 14:05:18 +00:00
Atemu
828a5922df Added a comment 2021-05-18 09:13:32 +00:00
Joey Hess
7d57866c3e
update for filter-branch 2021-05-17 15:03:47 -04:00
Joey Hess
c525d18cf7
filter-branch: New command, useful to produce a filtered version of the git-annex branch, eg when splitting a repository 2021-05-17 14:16:46 -04:00
Joey Hess
40f093775c
Merge branch 'filter-branch' 2021-05-17 14:16:13 -04:00
Joey Hess
24c7d9ba78
decided not to include export/import trees
They're only needed to cover a gc edge case, and it's better someone
gets caught by that edge case than that someone who does not know about
them ends up with a filtered git-annex branch that contains such a tree
when some of the files listed in it are ones they wanted to *remove*
from the repository.
2021-05-17 14:12:15 -04:00
Joey Hess
2420910ab8
include info for sameas repos
It's not currently possible to exclude a sameas repo using its
annex-config-uuid. (Remote.nameToUUID rejects them).
Since there's no real documented way to learn those, this seems ok, at
least for now. Also it avoids the problem of someone excluding the
parent but including the sameas, which would probably make the sameas
repo not usable when using the filtered branch.
2021-05-17 14:04:14 -04:00
Joey Hess
984034f335
filter-branch working aside from some edge cases
Added a note to man page about what happens to information that is
recorded in the private journal. Since it uses Branch.get, that
information will be copied when options allow. It seemed better to allow
it and document it than not allow it, since the options allow excluding
repositories and so can be used to exclude private repos if desired.
2021-05-17 13:24:58 -04:00
Joey Hess
8b6dad11a2
add createMessage
init: When annex.commitmessage is set, use that message for the commit
that creates the git-annex branch.

This will be used by filter-branch too, and it seems to make sense to let
annex.commitmessage affect it.
2021-05-17 13:07:47 -04:00
Joey Hess
1da9fe5bd8
implemented filter-branch for key info
Not tested yet but should work.

Noted a possible optimisation, which should probably be added, to
speed it up in cases where there is no uuid filtering being done.
It would need Annex.Branch to add a function like getRef that uses
catFileDetails, so the sha is also returned. The difficulty would be
making it support the precached file content; if it didn't it would
probably not be any faster and could even be slower. So probably the
precaching would need to be changed to also cache the sha.
2021-05-17 11:11:39 -04:00
https://esgf-node.llnl.gov/esgf-idp/openid/tom_clune
7d0b42e5cc Added a comment: update 2021-05-17 14:53:19 +00:00
Joey Hess
1d16654a22
convert formatLsTree to ByteString for speed 2021-05-17 10:46:24 -04:00
jrayguinn@616789b2aec6c923cd9897c86987f05581df3601
1e75348405 Added a comment: I Am. 2021-05-17 09:42:32 +00:00
jrayguinn@616789b2aec6c923cd9897c86987f05581df3601
03f91bd1c0 Added a comment: I Am. 2021-05-17 09:42:12 +00:00
Atemu
b4b6977cab Added a comment 2021-05-16 11:37:25 +00:00
Atemu
9b61cea255 2021-05-16 11:30:38 +00:00
Atemu
944b132103 2021-05-16 11:05:15 +00:00