Commit graph

46907 commits

Author SHA1 Message Date
Joey Hess
5fb0a7267a
releasing package git-annex version 10.20250721 2025-07-22 14:11:47 -04:00
mih
0de42855c5 Added a comment: Works! 2025-07-22 13:31:21 +00:00
Joey Hess
8867e7590a
prep for release of 10.20250721 2025-07-21 14:24:22 -04:00
Joey Hess
8767771901
Merge branch 'master' of ssh://git-annex.branchable.com 2025-07-21 14:16:35 -04:00
nobodyinperson
5a5332faab Added a comment: Workaround for default wanted content? 2025-07-21 18:12:59 +00:00
Joey Hess
cf449837ea
run reconcileStaged even in smudge clean filter, using alternate code path
Improved workaround for git 2.50 bug, avoding an occasional test suite
failure, as well as some situations where an unlocked file did not get
populated when adding another file to the repository with the same content.

This uses the alternate code path that was already using when there was
a conflict. Since that code path is not able to record its work,
it will redo the same work next time. If the only way reconcileStaged
is getting run is via the smudge clean filter, that could result in
more and more changes getting processed redundantly each time. Once
some other git-annex command runs and calls reconcileStaged, it
will stop redoing that work. I don't think the extra work will be a
problem.
2025-07-21 14:10:49 -04:00
Joey Hess
65a1cf54ce
make --keep-failures show full path to test repo
Otherwise, had to guess which of several subdirectories was the right
one.
2025-07-21 12:51:57 -04:00
Joey Hess
f4fdab0ffa
fixed build failure 2025-07-21 12:27:39 -04:00
Joey Hess
ba24f78626
fix build with OsPath build flag 2025-07-21 12:26:45 -04:00
Joey Hess
de6c5b6885
fix build warning 2025-07-21 12:25:17 -04:00
Joey Hess
d9bd90e598
response 2025-07-21 12:20:48 -04:00
Joey Hess
d364e434c8
Add --url option and url= preferred content expression
To match content that is recorded as present in an url.

Note that, this cannot ask remotes to provide an url using whereisKey, like
whereis does. Because preferred content expressions need to match the same
from multiple perspectives, and the remote would not always be available.

That's why the docs say "recorded as present", but still this may be
surprising to some who see an url in whereis output and are surprised they
cannot match on it.

The use of getDownloader is to strip the downloader prefix from urls like
"yt:". Note that, when OtherDownloader is used, this strips the ":" prefix,
and allows matching on those urls too.
2025-07-21 12:13:40 -04:00
Joey Hess
549569533b
Merge branch 'master' of ssh://git-annex.branchable.com 2025-07-21 10:53:08 -04:00
Joey Hess
ac25e5a6e7
todo 2025-07-19 16:45:51 -04:00
jnkl
6b4eabb161 Added a comment 2025-07-19 09:05:46 +00:00
Joey Hess
70da89d5b8
todo 2025-07-18 09:49:21 -04:00
jose1711
24b7f40cac Added a comment: fs type? 2025-07-18 09:10:50 +00:00
jnkl
cd3f5af7ed 2025-07-17 08:27:22 +00:00
mih
c58aa2cf47 Added a comment: Thanks! 2025-07-17 06:58:01 +00:00
Joey Hess
758515dc9a
fsck: Fix location of annexed files when run in linked worktrees
This cleans up after the bug that was fixed in commit
6a9e923c74
Object files that were stored in the wrong location are rescued,
and after that any wrong location logs will be fixed by the usual fsck.
2025-07-15 13:09:45 -04:00
Joey Hess
313d1b10fa
tag INM7
Based on submitter, I assume so..
2025-07-14 15:06:39 -04:00
Joey Hess
aded5f9b7f
extend gitAnnexLink special case for worktrees
Fix symlinks generated to annexed content when in adjusted unlocked branch in a
linked worktree on a filesystem not supporting symlinks.

Before this fix, the symlink generated by eg git-annex sync in an adjusted
unlocked branch contained ".git/worktrees/". There was a special case
for the similar problem with submodules, so just use it to handle this case as
well. To detect this case, rely on fixupUnusualRepos setting mainWorkTreePath.
2025-07-14 14:43:43 -04:00
Joey Hess
9cdcbedf2d
avoid changing gitdir
This code dates back 10 years to commit
e322826e33. But as far as I can tell,
it was never necessary. Notice that the comment added in that
commit doesn't match the code -- it says it adjusts the Repo when
the filesystem doesn't support symlinks, but it actually only adjusts
the Repo when the filesystem *does* support symlinks.

Testing in a submodule after this change, annex symlinks still point to
.git/annex/objects/.

(Note that gitAnnexLink contains a special case for submodules on filesystem
not supporting symlinks. I have verified that special case still works.
Without that special case, the annex links look like eg
"../.git/modules/foo/annex/objects", and with them, they look like
".git/annex/objects"
2025-07-14 14:22:27 -04:00
Joey Hess
addcd389ff
fixed but not ready to close yet 2025-07-14 13:36:17 -04:00
Joey Hess
6a9e923c74
fix handling of linked worktrees on filesystems w/o symlinks
Fix bug in handling of linked worktrees on filesystems not supporting
symlinks, that caused annexed file content to be stored in the wrong
location inside the git directory, and also caused pointer files to not get
populated.

This parameterizes functions in Annex.Locations with a GitLocationMaker.
The uses of standardGitLocationMaker are in cases where the path returned
by a function should not change when in a linked worktree. For example,
gitAnnexLink uses standardGitLocationMaker because symlink targets should
always be to ".git/annex/objects" paths, even when in a linked worktree.
Hopefully I have gotten all uses of standardGitLocationMaker right.

This also assumes that all path construction to the annex directory
is done via the functions in Annex.Locations, and there is no other,
ad-hoc construction elsewhere. Thankfully, Annex.Locations has been around
since the beginning, and has been used consistently. I think.

---

In fixupUnusualRepos, when symlinks are supported, the .git file is replaced
with a symlink to the linked worktree git directory. And in that directory,
an "annex" symlink points to the main annex directory. In that case,
it's not necessary to set mainWorkTreePath. It would be ok to set it,
but not setting it in that case allows an optimisation of avoiding reading
the "commondir" file.

The change to make fixupUnusualRepos set mainWorkTreePath when the
repository is not initialized yet is done in case the initialization itself
writes to the annex directory. If that were the case, without setting
mainWorkTreePath, the annex symlink would not be set up yet, and so
it might have created the annex directory in the wrong place. Currently
that didn't happen, but now that mainWorkTreePath is available, using it
here avoids any such later problem.

---

This commit does not deal with the mess of a worktree that has
experienced this bug before. In particular, if `git-annex get` were
run in such a worktree, it would have stored the object files in the
linked worktree's git directory, rather than in the main git directory.
Such misplaced object files need to be dealt with; the plan is to make
git-annex fsck notice and fix them.

A worktree that has experienced this bug before will contain unpopulated
pointer files. Those may eventually get fixed up in regular usage of
git-annex, but git-annex fsck will also fix them up.

---

Finally, this has me pondering if all of git-annex's state files should
really be stored in one common place across all linked worktrees. Should
perhaps state files that are specific to the worktree be stored per-worktree?
That has not been the case when using git-annex on filesystems supporting
symlinks, but it *has* been the case on filesystems not supporting
symlinks. Perhaps this leads to some other buggy behavior in some cases.
Or perhaps to extra work being done.

For example, the keys database has an associated files table. Which depends
on the worktree. But reconcileStaged updates that table, so when git-annex
is used first in one worktree and then in another one, reconcileStaged will
update the table to reflect the current worktree. Which is extra work each
time a different worktree is used. But also, what if two git-annex
processes are running at the same time, in separate worktrees? Probably
this needs more thought and investigation.

So there is a risk that this commit exposes such buggy behavior in a
situation where it didn't happen before, due to the filesystem not
supporting symlinks. But, given how much this bug crippled using linked
worktrees in such a situation, I doubt that many people have been doing
that.
2025-07-14 13:20:39 -04:00
Joey Hess
ed3d46a2de
comment typo 2025-07-14 09:49:51 -04:00
Joey Hess
5c34edc35c
subtlety 2025-07-11 15:55:50 -04:00
Joey Hess
3fba7910d2
complication 2025-07-11 14:46:36 -04:00
Joey Hess
ce1c47b658
analysis 2025-07-11 14:35:47 -04:00
Joey Hess
cedbf88c82
update 2025-07-11 12:50:25 -04:00
Joey Hess
2df204b411
another case 2025-07-11 12:42:22 -04:00
Joey Hess
93eb7864c8
reproed 2025-07-11 12:16:25 -04:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
072f2606a1 Added a comment 2025-07-09 19:36:24 +00:00
mih
98b7cf3ac4 Bug report with reproducer 2025-07-08 10:51:19 +00:00
Spencer
954ff63d86 Added a comment: We'll call this solved... 2025-07-08 07:01:21 +00:00
Joey Hess
ef30fa2fa9
support combineing --socket with HTTPs
Might be useful when proxying? Dunno.
2025-07-07 16:41:19 -04:00
Joey Hess
492c484a82
p2phttp: Added --socket option
Used protectedOutput to set up a umask that makes the socket only
accessible by the current user.

Authentication is still needed when using this option unless it is combined
with --wideopen. It was just simpler to keep authentication separate from
this.
2025-07-07 16:40:02 -04:00
Joey Hess
66b009a0f6
p2phttp: Scan multilevel directories with --directory
This allows for eg dir/user/repo structure. But also other layouts. It
still does not look for repositories that are nested inside other
repositories.

The check for symlinks is mostly to avoid cycles that would prevent
findRepos from returning. Eg, foo/bar/baz being a symlink to foo/bar.

If the directory is writable by someone else they can still race it and
get it to follow a symlink to some other directory. I don't think p2phttp
needs to worry about that kind of situation though, and I doubt it avoids
such problems when operating on files in a git-annex repository either.
2025-07-07 16:07:13 -04:00
Joey Hess
0ad937f230
Merge branch 'master' of ssh://git-annex.branchable.com 2025-07-07 15:23:59 -04:00
Joey Hess
bbaaab40c1
comment 2025-07-07 15:23:53 -04:00
Joey Hess
46ee651c94
non-tor AuthTokens
As groundwork for making git-annex p2p support other P2P networks than
tor hidden services, when an AuthToken is not a TorAnnex value, but
something else (that will be added later), store the P2PAddress that it
will be used with along with the AuthToken. And in loadP2PAuthTokens,
only return AuthTokens for the specified P2PAddress.

See commit 2de27751d6 for some design work
that led to this.

Also, git-annex p2p --gen-addresses is changed to generate a separate
AuthToken for every P2P address. Rather than generating a single
AuthToke and using it for every one. When we have more than just tor,
this will be important for security, to avoid a compromise of one P2P
network exposing the AuthToken used for another network.
2025-07-07 15:10:15 -04:00
Joey Hess
2de27751d6
design 2025-07-07 14:26:02 -04:00
Joey Hess
78e9d62c65
correction 2025-07-07 13:22:08 -04:00
Joey Hess
0a89dc0d5d
remove garbage from middle of comment 2025-07-07 13:21:21 -04:00
Joey Hess
27c50298f3
fix name of man page 2025-07-07 12:03:38 -04:00
Basile.Pinsard
fab100e0c9 2025-07-03 14:37:14 +00:00
Basile.Pinsard
e1587840ae 2025-07-03 14:32:10 +00:00
matrss
c4e10593e3 Added a comment 2025-07-03 11:07:06 +00:00
Joey Hess
1beb09f369
reenable appveyor test suite 2025-07-02 13:46:21 -04:00
Joey Hess
00da83e104
Merge branch 'master' of ssh://git-annex.branchable.com 2025-07-02 13:06:13 -04:00