RFC replay: implement support for writing new objects to a pack
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | merge-ort.c: finalize ODB transactions after each stepmerge-ort.c | +4 | 1 reply | |
| 2/3 | tmp-objdir: introduce `tmp_objdir_repack()`tmp-objdir.c tmp-objdir.h | +19 | 2 replies | |
| 3/3 | builtin/replay.c: introduce `--write-pack`Documentation/ builtin/ t/ | +59 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] replay: implement support for writing new objects to a pack
(Based on a combination of Christian's cc/git-replay and my tb/merge-tree-write-pack branches).
This RFC demonstrates extending the new --write-pack option that merge-tree recently learned to the replay builtin as well.
The approach is as follows:
- write a pack out after each step in the replay operation, so that subsequent steps may see any new object(s) created during previous steps
- combine those packs into one before migrating them back into the main object store
This is accomplished with a combination of the bulk-checkin and tmp-objdir APIs, with some minor modifications made to when we flush out and finalize bulk-checkin transactions.
The benefit to this approach is that we bound the number of inodes required per replayed commit to a constant (by default, 3: one for the .pack, one for the .idx, and another for the .rev file), instead of having each operation take an unbounded number of inodes proportional to the number of new objects created during that step. We also only migrate a single pack back to the main object store.
In other words, this makes the maximum number of inodes required by 'replay' grow proportional to the number of commits being replayed, instead of the number of new *objects* created as a result of the replay operation.
Taylor Blau (3):
merge-ort.c: finalize ODB transactions after each step
tmp-objdir: introduce tmp_objdir_repack() builtin/replay.c: introduce --write-pack
Documentation/git-replay.txt | 4 ++++ builtin/replay.c | 18 ++++++++++++++++++ merge-ort.c | 5 ++++- t/t3650-replay-basics.sh | 37 ++++++++++++++++++++++++++++++++++++ tmp-objdir.c | 13 +++++++++++++ tmp-objdir.h | 6 ++++++ 6 files changed, 82 insertions(+), 1 deletion(-)
Signature · 1 line
2.42.0.446.g0b9ef90488