Skip to content

pack v4 support in pack-objects

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11pack v4: allocate dicts from the beginningpackv4-create.c+12 -100 replies
2/11pack v4: stop using static/global variables in packv4-create.cpackv4-create.c packv4-create.h+69 -450 replies
3/11pack v4: move packv4-create.c to libgit.aMakefile packv4-create.c packv4-create.h +1 more+525 -4851 reply
4/11pack v4: add version argument to write_pack_headerbuiltin/pack-objects.c bulk-checkin.c pack-write.c +1 more+8 -60 replies
5/11pack-write.c: add pv4_encode_in_pack_object_headerpack-write.c pack.h+30 -01 reply
6/11pack-objects: add --version to specify written pack versionbuiltin/pack-objects.c+5 -10 replies
7/11list-objects.c: add show_tree_entry callback to traverse_commit_listbuiltin/pack-objects.c builtin/rev-list.c list-objects.c +2 more+14 -60 replies
8/11pack-objects: create pack v4 tablesbuiltin/pack-objects.c+85 -23 replies
9/11pack-objects: do not cache delta for v4 treesbuiltin/pack-objects.c+5 -10 replies
10/11pack-objects: exclude commits out of delta objects in v4builtin/pack-objects.c+4 -10 replies
11/11pack-objects: support writing pack v4builtin/pack-objects.c pack.h+76 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] pack v4 support in pack-objects

I can produce pack v4 on git.git with this and verify it with index-pack. I'm not familiar with pack-objects code and not really confident with my changes. Suggestions are welcome.

Also I chose to keep packv4-create.c in libgit.a and move test code out to test-packv4.c. Not sure if it's good decision. The other option is to copy necessary code to pack-objects.c, then delete packv4-create.c in the end. Either way we have the same amount of code move.

Thin pack support is not there yet, but it should be simple on pack-objects' end. Like the compatibility layer you added to sha1_file.c, this code does not take advantage of v4 as source packs (performance regressions entail) A lot of rooms for improvements.

Nguyễn Thái Ngọc Duy (11):
pack v4: allocate dicts from the beginning
pack v4: stop using static/global variables in packv4-create.c pack v4: move packv4-create.c to libgit.a
pack v4: add version argument to write_pack_header pack-write.c: add pv4_encode_in_pack_object_header
pack-objects: add --version to specify written pack version list-objects.c: add show_tree_entry callback to traverse_commit_list
pack-objects: create pack v4 tables
pack-objects: do not cache delta for v4 trees
pack-objects: exclude commits out of delta objects in v4
pack-objects: support writing pack v4

 Makefile               |   4 +-
 builtin/pack-objects.c | 187 +++++++++++++++--
 builtin/rev-list.c     |   4 +-
 bulk-checkin.c         |   2 +-
 list-objects.c         |   9 +-
 list-objects.h         |   3 +-
 pack-write.c           |  36 +++-
 pack.h                 |   6 +-
 packv4-create.c        | 534 ++++---------------------------------------------
 packv4-create.h (new)  |  50 +++++
 test-packv4.c (new)    | 476 +++++++++++++++++++++++++++++++++++++++++++
 upload-pack.c          |   2 +-
 12 files changed, 789 insertions(+), 524 deletions(-)
 create mode 100644 packv4-create.h
 create mode 100644 test-packv4.c
Signature · 1 line
1.8.2.83.gc99314b