fromMaybe (error $ "failed to create " ++ fromRef name)
<$> branchsha
go False = withIndex' True $ do
+ -- Create the index file. This is not necessary,
+ -- except to avoid a bug in git that causes
+ -- git write-tree to segfault when the index file does not
+ -- exist.
+ inRepo $ flip Git.UpdateIndex.streamUpdateIndex []
cmode <- annexCommitMode <$> Annex.getGitConfig
cmessage <- createMessage
inRepo $ Git.Branch.commitAlways cmode cmessage fullname []
* Allow find --branch to be used in a bare repository, the same as
the deprecated findref can be.
* add --dry-run: New option.
+ * Work around bug in git 2.37 that causes a segfault
+ when when core.untrackedCache is set, and broke git-annex init.
-- Joey Hess <id@joeyh.name> Mon, 25 Jul 2022 15:35:45 -0400
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 6"""
+ date="2022-08-04T17:46:32Z"
+ content="""
+Now 2 weeks since the segfault in git has been known, and they have not
+fixed it.
+
+Now feeling that it's might be worth git-annex init avoiding the
+segfault, by making sure to do something that creates the index file before
+write-tree. So I don't have to worry about when this gets fixed in git,
+or the chances that a buggy release will start being widely used for a long
+time.
+
+Yeah, done so.
+"""]]