Skip to content

Move exported packfile funcs to its own file

Jonathan Tan git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest23 patches 4 repliesIn review
  2. v225 patches 6 repliesSuperseded
  3. v1 RFC10 patches 12 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23pack: move pack name-related functionsMakefile builtin/index-pack.c builtin/pack-redundant.c +7 more+56 -450 replies
2/23pack: move static state variablespackfile.c packfile.h sha1_file.c+23 -130 replies
3/23pack: move pack_report()cache.h packfile.c packfile.h +1 more+26 -260 replies
4/23pack: move open_pack_index(), parse_pack_index()builtin/count-objects.c builtin/fsck.c builtin/pack-objects.c +7 more+163 -1480 replies
5/23pack: move release_pack_memory()git-compat-util.h packfile.c packfile.h +1 more+53 -510 replies
6/23pack: move pack-closing functionsbuiltin/am.c builtin/clone.c builtin/fetch.c +6 more+70 -630 replies
7/23pack: move use_pack()cache.h packfile.c packfile.h +2 more+298 -3060 replies
8/23pack: move unuse_pack()cache.h packfile.c packfile.h +1 more+10 -100 replies
9/23pack: move add_packed_git()cache.h connected.c packfile.c +2 more+55 -620 replies
10/23pack: move install_packed_git()cache.h packfile.c packfile.h +1 more+12 -110 replies
11/23pack: move {,re}prepare_packed_git and approximate_object_countbuiltin/gc.c bulk-checkin.c cache.h +8 more+238 -2320 replies
12/23pack: move unpack_object_header_buffer()cache.h packfile.c packfile.h +1 more+27 -260 replies
13/23pack: move get_size_from_delta()cache.h packfile.c packfile.h +1 more+41 -400 replies
14/23pack: move unpack_object_header()cache.h packfile.c packfile.h +1 more+27 -270 replies
15/23pack: move clear_delta_base_cache(), packed_object_info(), unpack_entry()cache.h packfile.c packfile.h +1 more+685 -6700 replies
16/23pack: move nth_packed_object_{sha1,oid}cache.h packfile.c packfile.h +1 more+46 -460 replies
17/23pack: move check_pack_index_ptr(), nth_packed_object_offset()cache.h packfile.c packfile.h +1 more+49 -490 replies
18/23pack: move find_pack_entry_one(), is_pack_valid()cache.h packfile.c packfile.h +1 more+82 -840 replies
19/23pack: move find_sha1_pack()cache.h http-push.c http-walker.c +3 more+18 -160 replies
20/23pack: move find_pack_entry() and make it globalpackfile.c packfile.h sha1_file.c+55 -530 replies
21/23pack: move has_sha1_pack()builtin/prune-packed.c cache.h diff.c +4 more+11 -80 replies
22/23pack: move has_pack_index()cache.h packfile.c packfile.h +1 more+10 -100 replies
23/23pack: move for_each_packed_object()builtin/cat-file.c cache.h packfile.c +3 more+54 -460 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 00/23] Move exported packfile funcs to its own file
Quoted 8 lines

You'd need to double check, but I think the topics that cause trouble are rs/find-apck-entry-bisection and jk/drop-sha1-entry-pos; you can start from v2.14.1 and merge these topics on top and then build your change on top. That would allow you to start cooking before both of them graduate to 'master', as I expect they are both quick-to-next material. There might be other topics that interfere with what you are doing, but you can easily find out what they are if you do a trial merge to 'next' and 'pu' yourself.

OK - in addition to the 2 you mentioned, I have found some others (likely added after you wrote that). The complete list is:
- rs/find-pack-entry-bisection
- jk/drop-sha1-entry-pos
- jt/sha1-file-cleanup (formerly part of this set)
- mk/use-size-t-in-zlib
- rs/unpack-entry-leakfix

I have merged all of these and rebased my patches on top.

Other changes:
- Used packfile.h instead of pack.h (following most people's preference)
- Ensured that I added functions to packfile.h retaining the order they were originally in, so that if you run "git diff <base> --color-moved --patience", there are much fewer zebra stripes

The merge base commit can be accessed online [1], if you need it.

[1] https://github.com/jonathantanmy/git/commits/packmigrate

Jonathan Tan (23):
pack: move pack name-related functions
pack: move static state variables
pack: move pack_report()
pack: move open_pack_index(), parse_pack_index()
pack: move release_pack_memory()
pack: move pack-closing functions
pack: move use_pack()
pack: move unuse_pack()
pack: move add_packed_git()
pack: move install_packed_git()
pack: move {,re}prepare_packed_git and approximate_object_count
pack: move unpack_object_header_buffer()
pack: move get_size_from_delta()
pack: move unpack_object_header()
pack: move clear_delta_base_cache(), packed_object_info(),
unpack_entry()
pack: move nth_packed_object_{sha1,oid}
pack: move check_pack_index_ptr(), nth_packed_object_offset()
pack: move find_pack_entry_one(), is_pack_valid()
pack: move find_sha1_pack()
pack: move find_pack_entry() and make it global
pack: move has_sha1_pack()
pack: move has_pack_index()
pack: move for_each_packed_object()

 Makefile                 |    1 +
 builtin/am.c             |    1 +
 builtin/cat-file.c       |    1 +
 builtin/clone.c          |    1 +
 builtin/count-objects.c  |    1 +
 builtin/fetch.c          |    1 +
 builtin/fsck.c           |    1 +
 builtin/gc.c             |    1 +
 builtin/index-pack.c     |    1 +
 builtin/merge.c          |    1 +
 builtin/pack-objects.c   |    1 +
 builtin/pack-redundant.c |    1 +
 builtin/prune-packed.c   |    1 +
 builtin/receive-pack.c   |    1 +
 bulk-checkin.c           |    1 +
 cache.h                  |  122 +--
 connected.c              |    1 +
 diff.c                   |    1 +
 fast-import.c            |    1 +
 fetch-pack.c             |    1 +
 git-compat-util.h        |    2 -
 http-backend.c           |    1 +
 http-push.c              |    1 +
 http-walker.c            |    1 +
 http.c                   |    1 +
 outgoing/packfile.h      |    0
 pack-bitmap.c            |    1 +
 pack-check.c             |    1 +
 packfile.c               | 1896 +++++++++++++++++++++++++++++++++++
 packfile.h               |  138 +++
 path.c                   |    1 +
 reachable.c              |    1 +
 revision.c               |    1 +
 server-info.c            |    1 +
 sha1_file.c              | 2452 ++++++----------------------------------------
 sha1_name.c              |    1 +
 streaming.c              |    1 +
 37 files changed, 2354 insertions(+), 2287 deletions(-)
 create mode 100644 outgoing/packfile.h
 create mode 100644 packfile.c
 create mode 100644 packfile.h
Signature · 1 line
2.14.1.480.gb18f417b89-goog