Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > I haven't poked at it much, but haven't you and Neeraj Singh (CC'd) > independently come up with two slightly different changes in > tmp-objdir.c to do the same thing? See the tmp-objdir.c part of: > > http://lore.kernel.org/git/543ea3569342165363c1602ce36683a54dce7a0b.1632527609.git.gitgitgadget@xxxxxxxxx > > And your: > > http://lore.kernel.org/git/67d3b2b09f9ddda616cdd0d1b12ab7afc73670ed.1630376800.git.gitgitgadget@xxxxxxxxx > > I.e. yours has the object database managed outside, his has it added to > "struct tmp_objdir", but it's the same objdir dance isn't it? They touch the same tmp-objdir, but unlike the original use in the receive-pack (i.e. responding to "git push") with the intention to add the objects collected in them back to the primary, remerge-diff wants to discard what was added there at the end. I do not think it would directly help the bulk-fsync stuff (but I didn't quite see why bulk-fsync stuff needed to _add_ new functions to tmp-objdir API, instead of just being a customer of tmp-objdir API), where it wants to do the same _migrate() dance in the end.