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
Find a file
Joey Hess 1558e03014
Refuse to upgrade direct mode repositories when git is older than 2.22
That git fixed a memory leak that could cause an OOM during the upgrade.

Most git-annex builds have a new enough git already.
OSX git was upgraded with brew.

Linux i386ancient build's git was too old. Upgrading it to a fixed
git didn't work (due to the newer git not working with the old ssh,
https://bugs.chromium.org/p/git/issues/detail?id=7 )

Choices to deal with that were:

* Somehow make direct mode upgrade work with the old git, avoiding its
  OOM problem. One way would be to switch the repo to indirect mode
  first, and so upgrade to a repo with locked files. Not good when
  the filesystem does not support symlinks.
* backport the OOM fix from git 2.22
  (And do what about the version number so git-annex knows it's fixed?)
* backport openssh (and possibly more stuff)
* move the i386ancient build to at least Debian stretch (still backporting git)
  But this will make it no longer work with some of the ancient kernels it
  targets.

Of those, backporting the OOM fix seemed the best approach. Put "oomfix"
in the git version number to indicate it.

I have not automated building the git backport, so here's the patch I
used:

diff -ur orig/git-2.1.4/convert.c git-2.1.4/convert.c
--- orig/git-2.1.4/convert.c	2014-12-18 18:42:18.000000000 +0000
+++ git-2.1.4/convert.c	2019-08-29 20:05:04.371872338 +0100
@@ -404,7 +404,7 @@
 	if (start_async(&async))
 		return 0;	/* error was already reported */

-	if (strbuf_read(&nbuf, async.out, len) < 0) {
+	if (strbuf_read(&nbuf, async.out, 0) < 0) {
 		error("read from external filter %s failed", cmd);
 		ret = 0;
 	}
diff -ur orig/git-2.1.4/GIT-VERSION-GEN git-2.1.4/GIT-VERSION-GEN
--- orig/git-2.1.4/GIT-VERSION-GEN	2014-12-18 18:42:18.000000000 +0000
+++ git-2.1.4/GIT-VERSION-GEN	2019-08-29 20:06:39.132743228 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh

 GVF=GIT-VERSION-FILE
-DEF_VER=v2.1.4
+DEF_VER=v2.1.4.oomfix

 LF='
 '
diff -ur orig/git-2.1.4/configure git-2.1.4/configure
--- orig/git-2.1.4/configure	2014-12-18 18:42:19.000000000 +0000
+++ git-2.1.4/configure	2019-08-29 20:27:45.896380015 +0100
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='git'
 PACKAGE_TARNAME='git'
-PACKAGE_VERSION='2.1.4'
-PACKAGE_STRING='git 2.1.4'
+PACKAGE_VERSION='2.1.4.oomfix'
+PACKAGE_STRING='git 2.1.4.oomfix'
 PACKAGE_BUGREPORT='git@vger.kernel.org'
 PACKAGE_URL=''

diff -ur orig/git-2.1.4/version git-2.1.4/version
--- orig/git-2.1.4/version	2014-12-18 18:42:19.000000000 +0000
+++ git-2.1.4/version	2019-08-29 20:06:17.572545210 +0100
@@ -1 +1 @@
-2.1.4
+2.1.4.oomfix
2019-08-29 15:24:41 -04:00
Annex init: Catch more exceptions when testing locking. 2019-08-29 12:19:07 -04:00
Assistant remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
Backend storing objects in git-lfs is working 2019-08-02 13:56:55 -04:00
Build fix unused module import warnings when building on windows 2019-08-08 12:18:53 -04:00
CmdLine remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Command info: remove "repository mode" 2019-08-29 14:12:22 -04:00
Config Add -- before %f in the smudge/clean filter configuration 2019-03-18 14:12:13 -04:00
Database Support building with socks-0.6 and persistant-template-2.7 2019-07-30 12:50:48 -04:00
debian Makefile: Changed default zsh completion location to zsh default fpath. 2019-08-16 14:08:56 -04:00
doc Refuse to upgrade direct mode repositories when git is older than 2.22 2019-08-29 15:24:41 -04:00
Git init: Install working hook scripts when run on a crippled filesystem and on Windows 2019-08-13 15:14:17 -04:00
Limit update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Logs fix init default description reversion 2019-06-20 20:30:24 -04:00
Messages remove many old version ifdefs 2019-07-05 15:09:37 -04:00
P2P minor typos 2019-03-27 11:15:20 -04:00
Remote remove a few more isDirect tests 2019-08-28 11:53:10 -04:00
RemoteDaemon update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
standalone remove bundled rsync from windows build 2019-07-22 09:37:42 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates webapp: remove configurators for obsolste cloud storage services 2019-01-22 11:48:35 -04:00
Test update test suite for removal of direct mode 2019-08-26 15:07:10 -04:00
Types improve error display when storing to an export/import remote fails 2019-08-13 12:05:00 -04:00
Upgrade Refuse to upgrade direct mode repositories when git is older than 2.22 2019-08-29 15:24:41 -04:00
Utility Refuse to upgrade direct mode repositories when git is older than 2.22 2019-08-29 15:24:41 -04:00
.ghci avoid ghci warning on tabs 2019-01-21 12:35:44 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore Removed Esqueleto as a dependency. 2018-11-06 22:18:55 +00:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs speed up enteringStage in non-concurrent mode 2019-06-19 15:47:54 -04:00
Assistant.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Backend.hs plumb MeterUpdate into getKey 2019-06-25 11:43:24 -04:00
bash-completion.bash bash completion fix 2018-11-12 13:23:05 -04:00
Benchmark.hs new improved benchmark command that can benchmark anything git-annex does 2019-01-04 13:46:36 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildFlags.hs Drop support for building with aws older than 0.14. 2019-04-19 14:27:59 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG Refuse to upgrade direct mode repositories when git is older than 2.22 2019-08-29 15:24:41 -04:00
CmdLine.hs get rid of implicitMessages state 2019-06-12 14:01:41 -04:00
Command.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Common.hs import Utility.FileSystemEncoding in Common 2019-01-03 11:37:02 -04:00
Config.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
COPYRIGHT finalizing lfs module 2019-08-01 14:04:56 -04:00
Creds.hs not a phantom type 2019-04-27 16:18:27 -04:00
Crypto.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ghci avoid tab warnings from ghc 8 2016-11-17 13:39:30 -04:00
git-annex.cabal reorg remaining direct mode code 2019-08-27 14:05:38 -04:00
git-annex.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Jenkinsfile Revert "debugging strange old version of git-annex in windows installer bundle" 2017-10-26 11:32:04 -04:00
Key.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Limit.hs make --in=here fast 2019-08-01 00:29:47 -04:00
Logs.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Makefile Makefile: Changed default zsh completion location to zsh default fpath. 2019-08-16 14:08:56 -04:00
Messages.hs Fix find --json to output json once more. 2019-07-05 09:58:37 -04:00
NEWS releasing package git-annex version 7.20181031 2018-10-31 15:46:57 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack-lts-12.14.yaml add stack-lts-12.14.yaml 2019-07-09 11:31:43 -04:00
stack.yaml Build with silently-1.2.5.1 on Windows; the old one used "NUL" which is not supported with recent versions of ghc. 2019-08-07 17:42:16 -04:00
Test.hs update test suite for removal of direct mode 2019-08-26 15:07:10 -04:00
Types.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Upgrade.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00

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 <https://git-annex.branchable.com/>