git-remote-annex: Require git version 2.31 or newer

Since old ones had a buggy git bundle command.

In particular, git 2.30.2 has a git bundle that supports --stdin, but does
not read from it, and so fails to create a bundle.

While not using --stdin would perhaps work, it limits the number of revs
that get included in the bundle to the command line length limit.

But the real kicker is that at the same time --stdin got fixed, a bug also
got fixed that made git bundle skip including refs when they had the same
sha as other refs it included. Which would lead to data loss. So best to
avoid that buggy thing.
This commit is contained in:
Joey Hess 2024-11-20 15:00:17 -04:00
parent e6a4ab5224
commit 31a38f8468
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 27 additions and 15 deletions

View file

@ -70,6 +70,8 @@ import qualified Data.Set as S
run :: [String] -> IO ()
run (remotename:url:[]) = do
unlessM Git.Bundle.versionSupported $
giveup "git-remote-annex needs a newer version of git"
repo <- getRepo
state <- Annex.new repo
Annex.eval state $