CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports
https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
ddd46db09a
Started with a problem when running addurl on a really long url, because the whole url is munged into the filename. Ended up doing a fairly extensive review for places where filenames could get too large, although it's hard to say I'm not missed any.. Backend.Url had a 128 character limit, which is fine when the limit is 255, but not if it's a lot shorter on some systems. So check the pathconf() limit. Note that this could result in fromUrl creating different keys for the same url, if run on systems with different limits. I don't see this is likely to cause any problems. That can already happen when using addurl --fast, or if the content of an url changes. Both Command.AddUrl and Backend.Url assumed that urls don't contain a lot of multi-byte unicode, and would fail to truncate an url that did properly. A few places use a filename as the template to make a temp file. While that's nice in that the temp file name can be easily related back to the original filename, it could lead to `git annex add` failing to add a filename that was at or close to the maximum length. Note that in Command.Add.lockdown, the template is still derived from the filename, just with enough space left to turn it into a temp file. This is an important optimisation, because the assistant may lock down a bunch of files all at once, and using the same template for all of them would cause openTempFile to iterate through the same set of names, looking for an unused temp file. I'm not very happy with the relatedTemplate hack, but it avoids that slowdown. Backend.WORM does not limit the filename stored in the key. I have not tried to change that; so git annex add will fail on really long filenames when using the WORM backend. It seems better to preserve the invariant that a WORM key always contains the complete filename, since the filename is the only unique material in the key, other than mtime and size. Since nobody has complained about add failing (I think I saw it once?) on WORM, probably it's ok, or nobody but me uses it. There may be compatability problems if using git annex addurl --fast or the WORM backend on a system with the 255 limit and then trying to use that repo in a system with a smaller limit. I have not tried to deal with those. This commit was sponsored by Alexander Brem. Thanks! |
||
---|---|---|
Annex | ||
Assistant | ||
Backend | ||
Build | ||
Command | ||
Common | ||
Config | ||
debian | ||
doc | ||
Git | ||
GitAnnex | ||
Logs | ||
Messages | ||
Remote | ||
standalone | ||
static | ||
templates | ||
Types | ||
Upgrade | ||
Utility | ||
.ghci | ||
.gitattributes | ||
.gitignore | ||
Annex.hs | ||
Assistant.hs | ||
Backend.hs | ||
BuildFlags.hs | ||
CHANGELOG | ||
Checks.hs | ||
CmdLine.hs | ||
Command.hs | ||
Common.hs | ||
Config.hs | ||
configure.hs | ||
COPYRIGHT | ||
Creds.hs | ||
Crypto.hs | ||
Fields.hs | ||
ghci | ||
git-annex.cabal | ||
git-annex.hs | ||
git-union-merge.hs | ||
Git.hs | ||
GitAnnex.hs | ||
GitAnnexShell.hs | ||
Init.hs | ||
INSTALL | ||
Limit.hs | ||
Locations.hs | ||
Makefile | ||
Messages.hs | ||
NEWS | ||
Option.hs | ||
README | ||
Remote.hs | ||
Seek.hs | ||
Setup.hs | ||
Test.hs | ||
Types.hs | ||
Upgrade.hs | ||
Usage.hs |
git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, checksumming time, or disk space. For documentation, see doc/ or <http://git-annex.branchable.com/>