Joey Hess [Tue, 27 Jul 2021 18:07:23 +0000 (14:07 -0400)]
move verifyKeyContent to Annex.Verify
The goal is that Database.Keys be able to use it; it can't use
Annex.Content.Presence due to an import loop.
Several other things also needed to be moved to Annex.Verify as a
conseqence.
Joey Hess [Tue, 27 Jul 2021 17:45:33 +0000 (13:45 -0400)]
comment
Joey Hess [Tue, 27 Jul 2021 17:16:22 +0000 (13:16 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 27 Jul 2021 17:01:30 +0000 (13:01 -0400)]
fix potential race in updating inode cache
Some uses of linkFromAnnex are inside replaceWorkTreeFile, which was
already safe, but others use it directly on the work tree file, which
was race-prone. Eg, if the work tree file was first removed, then
linkFromAnnex called to populate it, the user could have re-written it in
the interim.
This came to light during an audit of all calls of addInodeCaches,
looking for such races. All the other uses of it seem ok.
Sponsored-by: Brett Eisenberg on Patreon
Joey Hess [Tue, 27 Jul 2021 16:29:10 +0000 (12:29 -0400)]
fix potential race in updating inode cache
In Annex.Content, the object file was statted after pointer files were
populated. But if annex.thin is set, once the pointer files are
populated, the object file can potentially be modified via the hard
link. So, it was possible, though seemingly very unlikely, for the inode
of the modified object file to be cached.
Command.Fix and Command.Fsck had similar problems, statting the work
tree files after they were in place. Changed them to stat the temp file
that gets moved into place. This does rely on .git/annex being on the
same filesystem. If it's not, the cached inode will not be the same as
the one that the temp file gets moved to. Result will be that git-annex
will later need to do an expensive verification of the content of the
worktree files. Note that the cross-filesystem move of the temp file
already is a larger amount of extra work, so this seems acceptable.
Sponsored-by: Luke Shumaker on Patreon
mih [Tue, 27 Jul 2021 12:00:35 +0000 (12:00 +0000)]
Added a comment: Fixed in
8.20210715-g3b5a3e168
Joey Hess [Mon, 26 Jul 2021 21:33:49 +0000 (17:33 -0400)]
check if object is modified before starting to send it
Fix bug that caused some transfers to incorrectly fail with "content
changed while it was being sent", when the content was not changed.
While I don't know how to reproduce the problem that several people
reported, it is presumably due to the inode cache somehow being stale.
So check isUnmodified', and if it's not modified, include the file's
current inode cache in the set to accept, when checking for modification
after the transfer.
That seems like the right thing to do for another reason: The failure
says the file changed while it was being sent, but if the object file was
changed before the transfer started, that's wrong. So it needs to check
before allowing the transfer at all if the file is modified.
(Other calls to sameInodeCache or elemInodeCaches, when operating on inode
caches from the database, could also be problimatic if the inode cache is
somehow getting stale. This does not address such problems.)
Sponsored-by: Dartmouth College's Datalad project
Joey Hess [Mon, 26 Jul 2021 21:09:14 +0000 (17:09 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 18:12:58 +0000 (14:12 -0400)]
fix a place where the inode cache could potentially have gotten stale
When git-annex lock repopulates the object file by copying an associated
file that still has its content, it negected to update the inode cache.
I was not able to actually get this code to successfully repopulate the
object file; the associated file gets replaced with a dangling pointer
before unlock is able to do that. (By what I'm not sure..
reconcileStaged?) Which might be itself a bug, but
anyway this makes me doubtful that this was really leading to a stale
inode cache. Still, in case there is some situation in which it does
work, fixed it to update the inode cache.
Joey Hess [Mon, 26 Jul 2021 17:59:07 +0000 (13:59 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 16:57:35 +0000 (12:57 -0400)]
more inode cache debugging
Joey Hess [Mon, 26 Jul 2021 15:39:57 +0000 (11:39 -0400)]
propagate debugging into remote's Annex monad
This is needed to make the debugging added in
00733848509940d81026c24919a909acc6dfa21e actually be displayed when
running git-annex get from a local remote.
Joey Hess [Mon, 26 Jul 2021 15:16:58 +0000 (11:16 -0400)]
close this frustrating todo due to lack of followup and/or being fixed
Joey Hess [Mon, 26 Jul 2021 15:13:12 +0000 (11:13 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 14:48:28 +0000 (10:48 -0400)]
add debugging in sameInodeCache
mih [Mon, 26 Jul 2021 07:10:22 +0000 (07:10 +0000)]
Added a comment: strace logs
Joey Hess [Thu, 22 Jul 2021 18:14:25 +0000 (14:14 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 18:01:12 +0000 (14:01 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 17:34:27 +0000 (13:34 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 17:28:23 +0000 (13:28 -0400)]
comment
mih [Thu, 22 Jul 2021 14:59:23 +0000 (14:59 +0000)]
Added a comment: Carification
mih [Thu, 22 Jul 2021 14:54:40 +0000 (14:54 +0000)]
Added a comment: Reproducible with
8.20210715-g39d747936
Joey Hess [Wed, 21 Jul 2021 15:06:03 +0000 (11:06 -0400)]
comment
Added a comment
Added a comment
Joey Hess [Mon, 19 Jul 2021 16:39:17 +0000 (12:39 -0400)]
comment
Joey Hess [Mon, 19 Jul 2021 16:08:24 +0000 (12:08 -0400)]
sync, merge: Added --allow-unrelated-histories option
Which is the same as the git merge option.
After last commit, this turns out to be needed in the test suite, and when
doing git-annex import from special remote, followed by a git-annex merge.
Sponsored-by: Svenne Krap on Patreon
Joey Hess [Mon, 19 Jul 2021 15:40:48 +0000 (11:40 -0400)]
remove direct mode remnant of merging unrelated histories
sync, merge, post-receive: Avoid merging unrelated histories, which used to
be allowed only to support direct mode repositories.
(However, sync does still merge unrelated histories when importing trees
from special remotes, and the assistant still merges unrelated histories
always.)
See
556b2ded2ba8270846fa207255b4c2def6ef5d8a for why this was added
back in 2016, for direct mode.
This is a behavior change, which might break something that was relying
on sync merging unrelated histories, but git had a good reason to
prevent it, since it's easy to foot shoot with it, and git-annex should
follow suit.
Sponsored-by: Noam Kremen on Patreon
Joey Hess [Mon, 19 Jul 2021 15:28:31 +0000 (11:28 -0400)]
sync --quiet
* sync: When --quiet is used, run git commit, push, and pull without
their ususual output.
* merge: When --quiet is used, run git merge without its usual output.
This might also make --quiet work better for some other commands
that make commits, like git-annex adjust.
Sponsored-by: Kevin Mueller on Patreon
Joey Hess [Mon, 19 Jul 2021 15:24:45 +0000 (11:24 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 19 Jul 2021 14:29:12 +0000 (10:29 -0400)]
comment
Atemu [Sun, 18 Jul 2021 22:36:15 +0000 (22:36 +0000)]
remyabel [Sun, 18 Jul 2021 04:25:29 +0000 (04:25 +0000)]
anarcat [Sun, 18 Jul 2021 02:02:43 +0000 (02:02 +0000)]
Added a comment: same problem on debian bullseye
Joey Hess [Sat, 17 Jul 2021 21:42:57 +0000 (17:42 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Atemu [Fri, 16 Jul 2021 22:47:44 +0000 (22:47 +0000)]
Added a comment
Joey Hess [Fri, 16 Jul 2021 20:28:22 +0000 (16:28 -0400)]
close
Joey Hess [Fri, 16 Jul 2021 19:16:56 +0000 (15:16 -0400)]
comment
Joey Hess [Fri, 16 Jul 2021 18:16:05 +0000 (14:16 -0400)]
split annexLocations
To avoid mistakes like commit
0ccbed4f6fe0149229533b8448eee7dd6f90dc29,
be explicit about the two variants of this.
Incidentially avoids a small amount of overhead in calling reverse.
Sponsored-by: Shae Erisson on Patreon
Joey Hess [Fri, 16 Jul 2021 18:02:41 +0000 (14:02 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 16 Jul 2021 18:02:12 +0000 (14:02 -0400)]
I understand this now, marking confirmed
alt [Fri, 16 Jul 2021 12:37:47 +0000 (12:37 +0000)]
Added a comment
Atemu [Fri, 16 Jul 2021 11:21:43 +0000 (11:21 +0000)]
Added a comment
guardcat [Fri, 16 Jul 2021 06:34:53 +0000 (06:34 +0000)]
Added a comment: appendix
guardcat [Fri, 16 Jul 2021 06:21:23 +0000 (06:21 +0000)]
Added a comment: Fixing problem
guardcat [Fri, 16 Jul 2021 06:03:55 +0000 (06:03 +0000)]
removed
guardcat [Fri, 16 Jul 2021 06:02:17 +0000 (06:02 +0000)]
Added a comment: Fixing problem
Joey Hess [Fri, 16 Jul 2021 01:02:29 +0000 (21:02 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 16 Jul 2021 01:01:07 +0000 (21:01 -0400)]
fix oops
dd31fe7b9e44c42a3e0623cc06cd507bc60930ce broke non-bare repos by using
bare hash dirs first, oops
jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1 [Fri, 16 Jul 2021 00:32:49 +0000 (00:32 +0000)]
Lukey [Thu, 15 Jul 2021 18:40:13 +0000 (18:40 +0000)]
Added a comment
Lukey [Thu, 15 Jul 2021 18:30:22 +0000 (18:30 +0000)]
Clarify
Joey Hess [Thu, 15 Jul 2021 17:06:56 +0000 (13:06 -0400)]
more forumbugs
There are surely a lot more of these..
Joey Hess [Thu, 15 Jul 2021 17:05:25 +0000 (13:05 -0400)]
followup
Joey Hess [Thu, 15 Jul 2021 16:59:43 +0000 (12:59 -0400)]
more forumbugs
Joey Hess [Thu, 15 Jul 2021 16:56:44 +0000 (12:56 -0400)]
fix name
Joey Hess [Thu, 15 Jul 2021 16:55:05 +0000 (12:55 -0400)]
rename tag page
Joey Hess [Thu, 15 Jul 2021 16:53:03 +0000 (12:53 -0400)]
fix syntax
Joey Hess [Thu, 15 Jul 2021 16:52:21 +0000 (12:52 -0400)]
don't treat bugreport tag page as a bug report
Joey Hess [Thu, 15 Jul 2021 16:50:08 +0000 (12:50 -0400)]
forum posts tagged bugreport get moved to the bug list and can be closed
Joey Hess [Thu, 15 Jul 2021 16:38:55 +0000 (12:38 -0400)]
Fix retrieval of content from borg repos accessed over ssh
It was making the borgrepo path absolute.. even when it was a ssh
repository.
Made BorgRepo a newtype, to guard against accidentially treating it like a
FilePath.
Sponsored-by: Graham Spencer on Patreon
Joey Hess [Thu, 15 Jul 2021 16:19:49 +0000 (12:19 -0400)]
comment
Joey Hess [Thu, 15 Jul 2021 16:16:31 +0000 (12:16 -0400)]
fall back to checking lower case hash directories in normal repo
Fix a bug that prevented getting content from a repository that started out
as a bare repository, or had annex.crippledfilesystem set, and was
converted to a non-bare repository.
This unfortunately means that inAnnex check gets slowed down by a stat call
in normal repos when the content is not present. Oh well, such is the cost
of backwards compatability with old mistakes.
Sponsored-by: Mark Reidenbach on Patreon
Joey Hess [Thu, 15 Jul 2021 15:48:12 +0000 (11:48 -0400)]
comment
Joey Hess [Thu, 15 Jul 2021 15:43:40 +0000 (11:43 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
guardcat [Thu, 15 Jul 2021 10:33:26 +0000 (10:33 +0000)]
guardcat [Thu, 15 Jul 2021 10:29:59 +0000 (10:29 +0000)]
guardcat [Thu, 15 Jul 2021 09:45:54 +0000 (09:45 +0000)]
guardcat [Thu, 15 Jul 2021 09:35:40 +0000 (09:35 +0000)]
alt [Thu, 15 Jul 2021 07:19:33 +0000 (07:19 +0000)]
jzj [Thu, 15 Jul 2021 03:10:45 +0000 (03:10 +0000)]
Atemu [Wed, 14 Jul 2021 21:27:42 +0000 (21:27 +0000)]
Added a comment
Joey Hess [Wed, 14 Jul 2021 21:08:38 +0000 (17:08 -0400)]
wording
Joey Hess [Wed, 14 Jul 2021 20:47:21 +0000 (16:47 -0400)]
link
Joey Hess [Wed, 14 Jul 2021 20:28:07 +0000 (16:28 -0400)]
better key matching with a regexp
Handles keys that are substrings of other keys, as well as pointer files
that contain a newline after the key.
Note that -S does not match regexp, while -G does by default. Docs are
not clear, determined experimentally. The only other difference in
changing to -G is that if a file used to contain the key and changed
in some way, while still containing the key, -G will match and -S would
not. So eg, annex links that git annex fix rewrites will match, and
files that change lock status will match. Which is an improvement anyway.
Sponsored-by: Jochen Bartl on Patreon
Joey Hess [Wed, 14 Jul 2021 20:08:47 +0000 (16:08 -0400)]
change message to suggest using whereused --historical
Joey Hess [Wed, 14 Jul 2021 20:05:20 +0000 (16:05 -0400)]
have whereused also check the reflog
Since the stash is part of that, it can also find stashed content.
Sponsored-by: Boyd Stephen Smith Jr. on Patreon
Joey Hess [Wed, 14 Jul 2021 20:04:54 +0000 (16:04 -0400)]
minor bug in new whereused
Joey Hess [Wed, 14 Jul 2021 19:38:28 +0000 (15:38 -0400)]
whereused --historical
Does not check the reflog, but otherwise works.
It's possible for it to display something that is not an annexed file,
if a non-annexed file somehow ends up containing something that looks
like the key's name. This seems very unlikely to happen, and it would
add a lot of complexity to detect it and somehow skip over that file,
since the git log would need to either be run again, or not limited to 1
result and canceled once enough results have been read.
Also, it kind of seems ok, if a file refers to a key, to consider that
as a place the key was used, for some definition of used. So, I punted
on dealing with that. May revisit later.
Sponsored-by: Brock Spratlen on Patreon
Joey Hess [Wed, 14 Jul 2021 18:25:52 +0000 (14:25 -0400)]
whereused implemented
except --historical
Sponsored-by: Jack Hill on Patreon
Joey Hess [Wed, 14 Jul 2021 17:49:20 +0000 (13:49 -0400)]
add git-annex-filter-branch man page to cabal tarball
forgot to do this earlier
Joey Hess [Wed, 14 Jul 2021 17:43:45 +0000 (13:43 -0400)]
man page for git-annex whereused
And an implementation strategy.
Sponsored-by: Brett Eisenberg on Patreon
Joey Hess [Wed, 14 Jul 2021 16:26:13 +0000 (12:26 -0400)]
link to new catalina build
The old build is still present, but not being updated, so it seems best
to not link to it.
Joey Hess [Wed, 14 Jul 2021 16:23:57 +0000 (12:23 -0400)]
add news item for git-annex 8.
20210714
Joey Hess [Wed, 14 Jul 2021 16:23:24 +0000 (12:23 -0400)]
releasing package git-annex version 8.
20210714
Joey Hess [Wed, 14 Jul 2021 16:22:34 +0000 (12:22 -0400)]
update for OSX catalina build
Joey Hess [Wed, 14 Jul 2021 16:01:34 +0000 (12:01 -0400)]
comment
Atemu [Tue, 13 Jul 2021 21:13:12 +0000 (21:13 +0000)]
Added a comment
Joey Hess [Tue, 13 Jul 2021 18:00:19 +0000 (14:00 -0400)]
close not a bug
Joey Hess [Tue, 13 Jul 2021 17:20:14 +0000 (13:20 -0400)]
comment
Joey Hess [Tue, 13 Jul 2021 17:17:27 +0000 (13:17 -0400)]
comment
Joey Hess [Tue, 13 Jul 2021 17:04:56 +0000 (13:04 -0400)]
followup
Joey Hess [Tue, 13 Jul 2021 16:47:56 +0000 (12:47 -0400)]
comment
Joey Hess [Tue, 13 Jul 2021 16:19:21 +0000 (12:19 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 13 Jul 2021 16:15:40 +0000 (12:15 -0400)]
addistant: honor annex.delayadd for non-large files
assistant: When adding non-large files to git, honor annex.delayadd
configuration.
Also, don't add non-large files to git when they are still
being written to. This came for free, since the changes to non-large
files get queued up with the ones to large files, and run through the lsof
check.
Sponsored-by: Luke Shumaker on Patreon
Ilya_Shlyakhter [Tue, 13 Jul 2021 15:13:27 +0000 (15:13 +0000)]
Added a comment: (partial) filenames in keys
Ilya_Shlyakhter [Tue, 13 Jul 2021 03:05:45 +0000 (03:05 +0000)]
Added a comment
jkniiv@b330fc3a602d36a37a67b2a2d99d4bed3bb653cb [Mon, 12 Jul 2021 22:48:26 +0000 (22:48 +0000)]
Added a comment
Joey Hess [Mon, 12 Jul 2021 20:00:59 +0000 (16:00 -0400)]
comment
yarikoptic [Mon, 12 Jul 2021 17:44:58 +0000 (17:44 +0000)]
Added a comment