Commit graph

44887 commits

Author SHA1 Message Date
Joey Hess
58301e40d2
sync with special remotes with an annex:: url
Check explicitly for an annex:: url, not just any url. While no built-in
special remotes set an url, except ones that can be synced with, it
seems possible that some external special remote sets an url for its own
use, but did not expect it to be used by git-annex sync et al.

The assistant also syncs with them.
2024-05-24 14:57:29 -04:00
Joey Hess
22bf23782f
initremote, enableremote: Added --with-url to enable using git-remote-annex
Also sets remote.name.fetch to a typical value, same as git remote add does.
2024-05-24 14:29:36 -04:00
Joey Hess
7d61a99da3
todo 2024-05-24 13:57:33 -04:00
Joey Hess
0ba2b89c71
avoid displaying error from git symbolic-ref -q HEAD
Usually this won't fail even if .git/HEAD is not set or points to a ref
that doesn't exist. However, early in clone, it contains
"ref: refs/heads/.invalid" which causes an error "fatal: No such ref: HEAD"

When cloning from a special remote, git-remote-annex output that once
per bundle.
2024-05-24 13:49:18 -04:00
Joey Hess
2670508b97
also broke git-remote-annex 2024-05-24 13:35:45 -04:00
Joey Hess
b792b128a0
verified checkprereq
The case documented in its comment worked in a test push and clone.
2024-05-24 13:06:29 -04:00
Joey Hess
90580a2fad
comment 2024-05-24 12:57:11 -04:00
Joey Hess
54fa0e2f79
Merge branch 'master' of ssh://git-annex.branchable.com 2024-05-24 12:53:48 -04:00
Joey Hess
1a3c60cc8e
git-remote-annex: avoid bundle object leakage in push race or interrupted push
Locally record the manifest before uploading it or any bundles,
and read it on the next push. Any bundles from the push that are
not included in the currently being pushed manifest will get added
to the outManifest, and so eventually get deleted.

This deals with an interrupted push that is not resumed and instead
something else is pushed. And it deals with a push race that overwrites
the manifest.

Of course, this can't help if one of those situations is followed by
the local repo being deleted. But that's equivilant to doing a git-annex
copy of a new annexed file to a special remote and then deleting the
special repo w/o pushing. In either case the special remote ends up with
a object in it that git-annex doesn't know about.
2024-05-24 12:47:32 -04:00
derphysiker
fc7655324e 2024-05-23 20:49:06 +00:00
Joey Hess
4a77c77d2e
comment 2024-05-22 06:21:27 -04:00
Joey Hess
264c51b4f4
comment 2024-05-22 06:06:18 -04:00
Joey Hess
19ddbf0d74
Merge branch 'master' of ssh://git-annex.branchable.com 2024-05-22 04:26:52 -04:00
Joey Hess
4131e31f5c
PATH_MAX 2024-05-22 04:26:36 -04:00
TTTTAAAx
f332234c84 2024-05-22 06:27:30 +00:00
nobodyinperson
1a2bd28a52 Added a comment 2024-05-22 05:02:49 +00:00
datamanager
4b64964072 Added a comment 2024-05-21 23:32:34 +00:00
datamanager
01a085c27d Added a comment 2024-05-21 23:27:17 +00:00
datamanager
d5ab807b55 Added a comment: sourcehut plays nicely 2024-05-21 22:39:28 +00:00
datamanager
5a5a4452f8 Scrub my identifying information! 2024-05-21 22:36:22 +00:00
Joey Hess
5fb307f1c5
comment 2024-05-21 17:47:55 -04:00
Joey Hess
aff6c12949
muh2 2024-05-21 17:43:09 -04:00
Joey Hess
6fe63e4615
muh 2024-05-21 17:42:16 -04:00
Joey Hess
6c085cea9f
Merge branch 'master' of ssh://git-annex.branchable.com 2024-05-21 17:32:54 -04:00
Joey Hess
938e714a11
bleh 2024-05-21 17:32:49 -04:00
Joey Hess
10a60183e1
guard pushEmpty 2024-05-21 12:12:44 -04:00
Joey Hess
0041012498
guard pushEmpty 2024-05-21 12:09:45 -04:00
Joey Hess
969da25d66
simplify 2024-05-21 12:08:34 -04:00
Joey Hess
14c79373c4
update 2024-05-21 12:05:44 -04:00
Joey Hess
be8de26b68
Merge branch 'master' of ssh://git-annex.branchable.com 2024-05-21 11:53:34 -04:00
Joey Hess
be535caffc
fix deleting old keys in empty push 2024-05-21 11:53:03 -04:00
Joey Hess
7f768aef77
remove debug 2024-05-21 11:46:14 -04:00
Joey Hess
dc083bf8c8
fix storing outManifest 2024-05-21 11:44:47 -04:00
Joey Hess
b3d7ae51f0
fix edge case where git-annex branch does not have config for enabled special remote
One way this could happen is cloning an empty special remote.
A later fetch would then fail.
2024-05-21 11:27:49 -04:00
Joey Hess
3e7324bbcb
only delete bundles on pushEmpty
This avoids some apparently otherwise unsolveable problems involving
races that resulted in the manifest listing bundles that were deleted.

Removed the annex-max-git-bundles config because it can't actually
result in deleting old bundles. It would still be possible to have a
config that controls how often to do a full push, which would avoid
needing to download too many bundles on clone, as well as needing to
checkpresent too many bundles in verifyManifest. But it would need a
different name and description.
2024-05-21 11:13:27 -04:00
Joey Hess
f544946b09
update 2024-05-21 10:20:30 -04:00
Joey Hess
f191f52343
force pushing also does a full push 2024-05-21 10:10:49 -04:00
Joey Hess
b042dfeb0e
emptying pushes only delete 2024-05-21 09:52:35 -04:00
Joey Hess
5f4ad2a5de
refactor 2024-05-21 09:51:19 -04:00
Joey Hess
5d40759470
formalize problem description 2024-05-21 09:35:46 -04:00
nobodyinperson
1ab1ea0bcc Added a comment 2024-05-21 13:25:54 +00:00
datamanager
2135514bc7 Added a comment: Not git's fault, but probably your forge's 2024-05-21 13:12:23 +00:00
nobodyinperson
04aa259cfa Added a comment: Probably not git annex related, but a new git 'feature' 2024-05-21 10:49:58 +00:00
nobodyinperson
f0923985aa Added a comment: Seeing this for the first time today as well 2024-05-21 10:41:08 +00:00
datamanager
d94ce5319b A correction, and small update 2024-05-21 01:16:50 +00:00
datamanager
6280fac98b Initial thread posting 2024-05-21 01:16:02 +00:00
Joey Hess
644ed44ec1
Merge branch 'master' of ssh://git-annex.branchable.com 2024-05-20 15:52:44 -04:00
Joey Hess
3a38520aac
avoid interrupted push leaving remote without a manifest
Added a backup manifest key, which is used if the main manifest key is
not present. When uploading a new Manifest, it makes sure that it never
drops one key except when the other key is present.

It's entirely possible for the two manifest keys to get out of sync, due
to races. The main one wins when it's present, it is possible for the
main one being dropped to expose the backup one, which has a different
push recorded.
2024-05-20 15:41:09 -04:00
Joey Hess
594ca2fd3a
update 2024-05-20 14:52:06 -04:00
Joey Hess
57b303148b
remove outdated note 2024-05-20 14:00:29 -04:00