git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PULL REQUEST] initial pack v4 support

From
Nicolas Pitre <nico@fluxnic.net>
Date
Sep 9, 2013, 19:52 UTC
Message-ID
<alpine.LFD.2.03.1309091526430.20709@syhkavp.arg>
Junio, would you please pull the following into pu:
	git://git.linaro.org/people/nico/git

This is the pack v4 work to date which is somewhat getting usable. It is time it gets more exposure, and possibly some more people's attention who would like to work on the missing parts as I need to scale down my own involvement.

I've included the latest patches from Nguyn Th�i Ngc Duy (sorry for not handling your name properly) as well. There is no test suite for this yet, but the added code doesn't seem to regress the existing tests.

Nguy�n Th�i Ng�c Duy (31):
      Document pack v4 format
      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: split pv4_create_dict() out of load_dict()
      pack v4: add pv4_free_dict()
      index-pack: add more comments on some big functions
      index-pack: split out varint decoding code
      index-pack: do not allocate buffer for unpacking deltas in the first pass
      index-pack: split inflate/digest code out of unpack_entry_data
      index-pack: parse v4 header and dictionaries
      index-pack: make sure all objects are registered in v4's SHA-1 table
      index-pack: parse v4 commit format
      index-pack: parse v4 tree format
      index-pack: move delta base queuing code to unpack_raw_entry
      index-pack: record all delta bases in v4 (tree and ref-delta)
      index-pack: skip looking for ofs-deltas in v4 as they are not allowed
      index-pack: resolve v4 one-base trees
      pack v4: add version argument to write_pack_header
      pack_write: tighten valid object type check in encode_in_pack_object_header
      pack-write.c: add pv4_encode_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: do not cache delta for v4 trees
      pack-objects: exclude commits out of delta objects in v4
      pack-objects: create pack v4 tables
      pack-objects: prepare SHA-1 table in v4
      pack-objects: support writing pack v4
      pack v4: support "end-of-pack" indicator in index-pack and pack-objects
      index-pack: use nr_objects_final as sha1_table size
      index-pack: support completing thin packs v4
Nicolas Pitre (41):
      pack v4: initial pack dictionary structure and code
      export packed_object_info()
      pack v4: scan tree objects
      pack v4: add tree entry mode support to dictionary entries
      pack v4: add commit object parsing
      pack v4: split the object list and dictionary creation
      pack v4: move to struct pack_idx_entry and get rid of our own struct idx_entry
      pack v4: basic SHA1 reference encoding
      introduce get_sha1_lowhex()
      pack v4: commit object encoding
      pack v4: tree object encoding
      pack v4: dictionary table output
      pack v4: creation code
      pack v4: object headers
      pack v4: object data copy
      pack v4: object writing
      pack v4: tree object delta encoding
      pack v4: load delta candidate for encoding tree objects
      packv4-create: optimize delta encoding
      pack v4: honor pack.compression config option
      pack v4: relax commit parsing a bit
      packv4-create: don't transcode tree objects with zero-padded file modes
      pack index v3
      packv4-create: normalize pack name to properly generate the pack index file name
      packv4-create: add progress display
      pack v4: initial pack index v3 support on the read side
      pack v4: object header decode
      pack v4: code to obtain a SHA1 from a sha1ref
      pack v4: code to load and prepare a pack dictionary table for use
      pack v4: code to retrieve an ident entry
      pack v4: code to recreate a canonical commit object
      sha1_file.c: make use of decode_varint()
      pack v4: parse delta base reference
      pack v4: we can read commit objects now
      pack v4: code to retrieve a path component
      pack v4: decode tree objects
      pack v4: we can read tree objects now
      packv4-create: add a command line argument to limit tree copy sequences
      pack v4: allow canonical commit and tree objects
      packv4-parse.c: get rid of snprintf()
      packv4-parse.c: allow tree entry copying from a canonical tree object
 Documentation/technical/pack-format.txt | 138 ++++-
 Makefile                                |   5 +
 builtin/index-pack.c                    | 781 ++++++++++++++++++++++----
 builtin/pack-objects.c                  | 230 +++++++-
 builtin/rev-list.c                      |   4 +-
 bulk-checkin.c                          |   2 +-
 cache.h                                 |  13 +
 hex.c                                   |  11 +
 list-objects.c                          |   9 +-
 list-objects.h                          |   3 +-
 pack-check.c                            |   4 +-
 pack-revindex.c                         |   7 +-
 pack-write.c                            |  57 +-
 pack.h                                  |   6 +-
 packv4-create.c                         | 685 ++++++++++++++++++++++
 packv4-create.h                         |  39 ++
 packv4-parse.c                          | 576 +++++++++++++++++++
 packv4-parse.h                          |  18 +
 sha1_file.c                             | 116 +++-
 test-packv4.c                           | 476 ++++++++++++++++
 upload-pack.c                           |   2 +-
 21 files changed, 3007 insertions(+), 175 deletions(-)
Next: Junio C Hamano
Message 1 of 36 in “[PULL REQUEST] initial pack v4 support”
  1. Nicolas PitreSep 9, 2013
  2. Junio C HamanoSep 9, 2013
  3. Junio C HamanoSep 10, 2013
  4. Nicolas PitreSep 10, 2013
  5. Junio C HamanoSep 10, 2013
  6. Nicolas PitreSep 10, 2013
  7. 00/21 np/pack-v4 updatesNguyễn Thái Ngọc Duy, Sep 11, 2013
  8. 01/21 fixup! pack-objects: prepare SHA-1 table in v4Nguyễn Thái Ngọc Duy, Sep 11, 2013
  9. 02/21 fixup! pack-objects: support writing pack v4Nguyễn Thái Ngọc Duy, Sep 11, 2013
  10. 03/21 fixup! pack v4: support "end-of-pack" indicator in index-pack and pack-objectsNguyễn Thái Ngọc Duy, Sep 11, 2013
  11. 04/21 fixup! index-pack: parse v4 header and dictionariesNguyễn Thái Ngọc Duy, Sep 11, 2013
  12. 05/21 fixup! index-pack: record all delta bases in v4 (tree and ref-delta)Nguyễn Thái Ngọc Duy, Sep 11, 2013
  13. 06/21 pack v4: lift dict size check in load_dict()Nguyễn Thái Ngọc Duy, Sep 11, 2013
  14. 07/21 pack v4: move pv4 objhdr parsing code to packv4-parse.cNguyễn Thái Ngọc Duy, Sep 11, 2013
  15. 08/21 pack-objects: respect compression level in v4Nguyễn Thái Ngọc Duy, Sep 11, 2013
  16. 09/21 pack-objects: recognize v4 as pack sourceNguyễn Thái Ngọc Duy, Sep 11, 2013
  17. 10/21 pack v4: add a note that streaming does not support OBJ_PV4_*Nguyễn Thái Ngọc Duy, Sep 11, 2013
  18. 11/21 unpack-objects: report missing object nameNguyễn Thái Ngọc Duy, Sep 11, 2013
  19. 12/21 unpack-objects: recognize end-of-pack in v4 thin packNguyễn Thái Ngọc Duy, Sep 11, 2013
  20. 13/21 unpack-objects: read v4 dictionariesNguyễn Thái Ngọc Duy, Sep 11, 2013
  21. 14/21 unpack-objects: decode v4 object headerNguyễn Thái Ngọc Duy, Sep 11, 2013
  22. 15/21 unpack-objects: decode v4 ref-deltaNguyễn Thái Ngọc Duy, Sep 11, 2013
  23. 16/21 unpack-objects: decode v4 commitsNguyễn Thái Ngọc Duy, Sep 11, 2013
  24. 17/21 unpack-objects: allow to save processed bytes to a bufferNguyễn Thái Ngọc Duy, Sep 11, 2013
  25. 18/21 unpack-objects: decode v4 treesNguyễn Thái Ngọc Duy, Sep 11, 2013
  26. 19/21 index-pack, pack-objects: allow creating .idx v2 with .pack v4Nguyễn Thái Ngọc Duy, Sep 11, 2013
  27. Nicolas PitreSep 11, 2013
  28. 20/21 show-index: acknowledge that it does not read .idx v3Nguyễn Thái Ngọc Duy, Sep 11, 2013
  29. Nicolas PitreSep 11, 2013
  30. 21/21 t1050, t5500: replace the use of "show-index|wc -l" with verify-packNguyễn Thái Ngọc Duy, Sep 11, 2013
  31. Duy NguyenSep 11, 2013
  32. Nicolas PitreSep 11, 2013
  33. Duy NguyenSep 12, 2013
  34. Nicolas PitreSep 12, 2013
  35. Duy NguyenSep 13, 2013
  36. Nicolas PitreSep 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.