Skip to content

RFC Moving global state into the repository object

Stefan Beller git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest194 patches 44 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/194repository: introduce object store fieldobject-store.h repository.c repository.h+18 -10 replies
2/194object-store: move alt_odb_list and alt_odb_tail to object storebuiltin/fsck.c cache.h object-store.h +3 more+26 -190 replies
3/194object-store: move packed_git and packed_git_mru to object storebuiltin/count-objects.c builtin/fsck.c builtin/gc.c +20 more+115 -729 replies
4/194pack: move prepare_packed_git_run_once to object storeobject-store.h packfile.c+10 -50 replies
5/194pack: move approximate object count to object storeobject-store.h packfile.c+14 -70 replies
6/194sha1_file: add repository argument to alt_odb_usablesha1_file.c+4 -20 replies
7/194sha1_file: add repository argument to link_alt_odb_entrysha1_file.c+5 -30 replies
8/194sha1_file: add repository argument to read_info_alternatessha1_file.c+7 -40 replies
9/194sha1_file: add repository argument to link_alt_odb_entriessha1_file.c+13 -60 replies
10/194sha1_file: add repository argument to stat_sha1_filesha1_file.c+5 -40 replies
11/194sha1_file: add repository argument to open_sha1_filesha1_file.c+4 -20 replies
12/194sha1_file: add repository argument to map_sha1_file_1sha1_file.c+6 -50 replies
13/194sha1_file: add repository argument to sha1_loose_object_infosha1_file.c+5 -40 replies
14/194object-store: add repository argument to prepare_alt_odbbuiltin/fsck.c cache.h object-store.h +3 more+14 -100 replies
15/194object-store: add repository argument to foreach_alt_odbbuiltin/count-objects.c builtin/submodule--helper.c cache.h +3 more+13 -70 replies
16/194pack: add repository argument to install_packed_gitfast-import.c http.c packfile.c +1 more+7 -50 replies
17/194pack: add repository argument to prepare_packed_git_onepackfile.c+4 -30 replies
18/194pack: add repository argument to rearrange_packed_gitpackfile.c+3 -20 replies
19/194pack: add repository argument to prepare_packed_git_mrupackfile.c+3 -20 replies
20/194pack: add repository argument to prepare_packed_gitbuiltin/count-objects.c builtin/fsck.c builtin/gc.c +10 more+22 -170 replies
21/194pack: add repository argument to reprepare_packed_gitbuiltin/gc.c builtin/receive-pack.c bulk-checkin.c +5 more+15 -70 replies
21/194pack: add repository argument to reprepare_packed_gitbuiltin/gc.c builtin/receive-pack.c bulk-checkin.c +5 more+15 -70 replies
22/194pack: add repository argument to sha1_file_namecache.h http-walker.c http.c +2 more+20 -160 replies
23/194pack: add repository argument to map_sha1_filecache.h object-store.h sha1_file.c +1 more+8 -40 replies
24/194sha1_file: allow alt_odb_usable to handle arbitrary repositoriessha1_file.c+9 -70 replies
25/194object-store: allow prepare_alt_odb to handle arbitrary repositoriescache.h object-store.h sha1_file.c+38 -325 replies
26/194object-store: allow foreach_alt_odb to handle arbitrary repositoriesobject-store.h sha1_file.c+8 -90 replies
27/194pack: allow install_packed_git to handle arbitrary repositoriespackfile.c packfile.h+4 -50 replies
28/194pack: allow rearrange_packed_git to handle arbitrary repositoriespackfile.c+3 -40 replies
29/194pack: allow prepare_packed_git_mru to handle arbitrary repositoriespackfile.c+4 -50 replies
30/194pack: allow prepare_packed_git_one to handle arbitrary repositoriespackfile.c+4 -50 replies
31/194pack: allow prepare_packed_git to handle arbitrary repositoriespackfile.c packfile.h+10 -110 replies
32/194pack: allow reprepare_packed_git to handle arbitrary repositoriespackfile.c packfile.h+5 -60 replies
33/194pack: allow sha1_file_name to handle arbitrary repositoriesobject-store.h sha1_file.c+3 -40 replies
34/194pack: allow stat_sha1_file to handle arbitrary repositoriessha1_file.c+5 -60 replies
35/194pack: allow open_sha1_file to handle arbitrary repositoriessha1_file.c+5 -60 replies
36/194pack: allow map_sha1_file_1 to handle arbitrary repositoriessha1_file.c+3 -50 replies
37/194pack: allow map_sha1_file to handle arbitrary repositoriesobject-store.h sha1_file.c+4 -40 replies
38/194pack: allow sha1_loose_object_info to handle arbitrary repositoriessha1_file.c+5 -62 replies
39/194replace_object.c: rename to use dash in file nameMakefile replace-object.c+1 -10 replies
40/194replace-object: move replace_object to object storeobject-store.h replace-object.c replace-object.h+46 -250 replies
41/194sha1_file: add repository argument to sha1_object_info_extendedbuiltin/cat-file.c cache.h packfile.c +2 more+14 -110 replies
42/194object-store: move alternates API to new alternates.halternates.h builtin/clone.c builtin/count-objects.c +12 more+102 -745 replies
43/194object-store: move loose object functions to new loose-object.hbuiltin/cat-file.c builtin/count-objects.c builtin/fsck.c +11 more+105 -790 replies
44/194pack: move struct pack_window and pack_entry to packfile.hbuiltin/pack-objects.c cache.h object-store.h +3 more+23 -150 replies
45/194object-store: move object access functions to object-store.happly.c archive-tar.c archive-zip.c +65 more+178 -1040 replies
46/194object-store: move replace_objects back to object-storeobject-store.h replace-object.h+10 -142 replies
47/194object-store: move lookup_replace_object to replace-object.hbuiltin/mktag.c object-store.h object.c +3 more+26 -190 replies
48/194replace-object: add repository argument to do_lookup_replace_objectreplace-object.c replace-object.h+4 -30 replies
49/194replace-object: move replace objects prepared flag to object storeobject-store.h replace-object.c+5 -50 replies
50/194replace-object: check_replace_refs is safe in multi repo environmentenvironment.c replace-object.c replace-object.h+4 -41 reply
51/194refs: add repository argument to for_each_replace_refbuiltin/replace.c refs.c refs.h +1 more+7 -40 replies
52/194refs: add repository argument to get_main_ref_storebuiltin/pack-refs.c refs.c refs.h +2 more+44 -380 replies
53/194replace-object: add repository argument to register_replace_objectreplace-object.c+5 -30 replies
54/194replace-object: add repository argument to register_replace_refreplace-object.c+4 -10 replies
55/194replace-object: add repository argument to replace_object_posreplace-object.c+5 -30 replies
56/194replace-object: allow replace_object_pos to handle arbitrary repositoriesreplace-object.c+3 -50 replies
57/194replace-object: allow register_replace_object to handle arbitrary repositoriesreplace-object.c+16 -170 replies
58/194replace-object: add repository argument to prepare_replace_objectreplace-object.c+4 -20 replies
59/194refs: store the main ref store inside the repository structrefs.c refs.h repository.c +1 more+12 -122 replies
60/194refs: allow for_each_replace_ref to handle arbitrary repositoriesrefs.c refs.h+3 -50 replies
61/194replace-object: allow prepare_replace_object to handle arbitrary repositoriesreplace-object.c+4 -60 replies
62/194replace_object: allow do_lookup_replace_object to handle arbitrary repositoriesreplace-object.c replace-object.h+6 -60 replies
63/194replace-object: add repository argument to lookup_replace_objectbuiltin/mktag.c object.c replace-object.h +2 more+8 -70 replies
64/194repository: allow lookup_replace_object to handle arbitrary repositoriesreplace-object.h+5 -50 replies
65/194object-store: add repository argument to sha1_object_infoarchive-tar.c archive-zip.c blame.c +28 more+97 -511 reply
66/194pack: add repository argument to retry_bad_packed_offsetpackfile.c+5 -30 replies
67/194pack: add repository argument to packed_to_object_typepackfile.c+9 -70 replies
68/194pack: add repository argument to packed_object_infobuiltin/pack-objects.c packfile.c packfile.h +1 more+7 -50 replies
69/194pack: add repository argument to find_pack_entrypackfile.c packfile.h sha1_file.c+7 -60 replies
70/194packfile: add repository argument to read_objectpackfile.c+5 -30 replies
71/194packfile: add repository argument to unpack_entryfast-import.c pack-check.c packfile.c +1 more+9 -60 replies
72/194packfile: add repository argument to cache_or_unpack_entrypackfile.c+3 -20 replies
73/194pack: allow find_pack_entry to handle arbitrary repositoriespackfile.c packfile.h+10 -70 replies
74/194object-store: allow sha1_object_info to handle arbitrary repositoriesobject-store.h packfile.c packfile.h +1 more+51 -520 replies
75/194fetch, push: do not use submodule as alternate in has_commits checksubmodule.c+38 -142 replies
76/194push: add test showing bad interaction of replace refs and submodulest/t5531-deep-submodule-push.sh+16 -02 replies
77/194replace_object: allow register_replace_ref to handle arbitrary repositoriesreplace-object.c+1 -20 replies
78/194cache.h: migrate the definition of object_id to object.hcache.h object.h+13 -120 replies
79/194repository: introduce object parser fieldobject-store.h object.c object.h +2 more+43 -260 replies
80/194object: add repository argument to parse_objectbuiltin/diff-tree.c builtin/diff.c builtin/fast-export.c +30 more+95 -660 replies
81/194object: add repository argument to create_objectblob.c commit.c contrib/coccinelle/object_parser.cocci +4 more+22 -70 replies
82/194object: add repository argument to lookup_objectblob.c builtin/fast-export.c builtin/fsck.c +13 more+35 -240 replies
83/194object: add repository argument to grow_object_hashobject.c+3 -20 replies
84/194blob: add repository argument to lookup_blobblob.c blob.h builtin/describe.c +14 more+30 -180 replies
85/194tree: add repository argument to lookup_treebuiltin/am.c builtin/diff-tree.c builtin/diff.c +16 more+38 -230 replies
86/194tag: add repository argument to lookup_tagbuiltin/describe.c builtin/pack-objects.c builtin/replace.c +6 more+19 -120 replies
87/194tag: add repository argument to parse_tag_bufferbuiltin/replace.c contrib/coccinelle/object_parser.cocci log-tree.c +4 more+17 -70 replies
88/194tag: add repository argument to deref_tagblame.c builtin/diff.c builtin/fmt-merge-msg.c +16 more+51 -260 replies
89/194object: add repository argument to lookup_commit_reference_gentlyarchive.c blame.c builtin/checkout.c +16 more+68 -370 replies
90/194object: add repository argument to lookup_commit_referencebisect.c blame.c branch.c +23 more+69 -480 replies
91/194object: add repository argument to lookup_commitbuiltin/am.c builtin/commit-tree.c builtin/commit.c +17 more+47 -270 replies
92/194object: move grafts to object parsercommit.c object.h+28 -222 replies
93/194object: add repository argument to commit_graft_poscommit.c+5 -40 replies
94/194commit: add repository argument to parse_commit_buffercommit.c commit.h contrib/coccinelle/object_parser.cocci +2 more+15 -50 replies
95/194object: add repository argument to register_commit_graftbuiltin/blame.c commit.c commit.h +2 more+16 -50 replies
96/194object: add repository argument to read_graft_filecommit.c+3 -20 replies
97/194object: add repository argument to prepare_commit_graftcommit.c+3 -20 replies
98/194object: add repository argument to lookup_commit_graftcommit.c commit.h contrib/coccinelle/object_parser.cocci +2 more+15 -60 replies
99/194object: allow grow_object_hash to handle arbitrary repositoriesobject.c+9 -80 replies
100/194object: allow create_object to handle arbitrary repositoriesobject.c object.h+7 -80 replies
101/194object: allow lookup_object to handle arbitrary repositoriesobject.c object.h+8 -100 replies
102/194object: add repository argument to lookup_unknown_objectbuiltin/fsck.c builtin/pack-objects.c contrib/coccinelle/object_parser.cocci +7 more+19 -110 replies
103/194object: allow lookup_unknown_object to handle arbitrary repositoriesobject.c object.h+5 -50 replies
104/194object: add repository argument to parse_object_bufferbuiltin/fast-export.c builtin/fsck.c builtin/index-pack.c +5 more+28 -90 replies
105/194repository: keep track of all open repositoriesbuiltin/grep.c builtin/ls-files.c packfile.c +3 more+61 -260 replies
106/194Rename sha1_object_info.cocci to object_store.coccicontrib/coccinelle/object_store.cocci+0 -00 replies
107/194alternates: add repository argument to add_to_alternates_filealternates.h builtin/clone.c sha1_file.c+8 -60 replies
108/194alternates: add repository argument to add_to_alternates_memoryalternates.h builtin/grep.c sha1_file.c +3 more+7 -60 replies
109/194object-store: move check_sha1_signature to object-store.hcache.h object-store.h sha1_file.c+9 -80 replies
110/194object-store: add repository argument to check_sha1_signaturebuiltin/fast-export.c builtin/index-pack.c builtin/mktag.c +5 more+22 -90 replies
111/194object-store: add repository argument to read_objectsha1_file.c+4 -30 replies
112/194object-store: add repository argument to read_sha1_file_extendedcontrib/coccinelle/object_store.cocci object-store.h sha1_file.c +1 more+16 -40 replies
113/194object-store: add repository argument to read_sha1_fileapply.c archive.c bisect.c +48 more+162 -800 replies
114/194object: move read_object_with_reference to object.hcache.h object.h+16 -50 replies
115/194packfile: add repository argument to has_packed_and_badpackfile.c packfile.h sha1_file.c+5 -30 replies
116/194packfile: allow has_packed_and_bad to handle arbitrary repositoriespackfile.c packfile.h+3 -40 replies
117/194streaming: add repository argument to open_istream_fnstreaming.c+16 -40 replies
119/194streaming: add repository argument to istream_sourcestreaming.c+3 -20 replies
120/194streaming: allow istream_source to handle arbitrary repositoriesstreaming.c+3 -30 replies
121/194sha1_file: allow read_object to handle arbitrary repositoriessha1_file.c+3 -40 replies
122/194object-store.h: allow read_sha1_file{_extended} to handle arbitrary repositoriesobject-store.h sha1_file.c+11 -100 replies
123/194streaming: allow open_istream_incore to handle arbitrary repositoriesstreaming.c+1 -40 replies
124/194streaming: allow open_istream_pack_non_delta to handle arbitrary repositoriesstreaming.c+0 -30 replies
125/194streaming: allow open_istream_loose to handle arbitrary repositoriesstreaming.c+1 -50 replies
126/194streaming: allow open_istream to handle arbitrary repositoriesstreaming.c streaming.h+7 -70 replies
127/194alternates: convert add_to_alternates_memory to handle arbitrary reposalternates.h sha1_file.c tmp-objdir.c+5 -60 replies
128/194object: add repository argument to object_as_typeblob.c builtin/fsck.c commit.c +5 more+10 -90 replies
129/194alloc: add repository argument to alloc_blob_nodealloc.c blob.c cache.h+4 -30 replies
130/194alloc: add repository argument to alloc_tree_nodealloc.c cache.h tree.c+4 -30 replies
131/194alloc: add repository argument to alloc_commit_nodealloc.c blame.c cache.h +2 more+6 -50 replies
132/194alloc: add repository argument to alloc_tag_nodealloc.c cache.h tag.c+4 -30 replies
133/194alloc: add repository argument to alloc_object_nodealloc.c cache.h object.c+4 -30 replies
134/194alloc: add repository argument to alloc_reportalloc.c cache.h+3 -20 replies
135/194alloc: add repository argument to alloc_commit_indexalloc.c cache.h object.c+5 -40 replies
136/194alloc: allow arbitrary repositories for alloc functionsalloc.c cache.h object.h +1 more+59 -371 reply
137/194object: allow object_as_type to handle arbitrary repositoriesobject.c object.h+3 -40 replies
138/194commit: allow lookup_commit to handle arbitrary repositoriescommit.c commit.h+6 -70 replies
139/194sha1_file: allow add_to_alternates_file to handle arbitrary repositoriesalternates.h sha1_file.c+5 -60 replies
140/194commit: convert commit_graft_pos() to handle arbitrary repositoriescommit.c+3 -40 replies
141/194commit: convert register_commit_graft to handle arbitrary repositoriescommit.c commit.h+16 -160 replies
142/194commit: convert read_graft_file to handle arbitrary repositoriescommit.c+2 -30 replies
143/194object: add repository argument to parse_commit_gentlycommit.c commit.h contrib/coccinelle/object_store.cocci +1 more+15 -50 replies
144/194commit: add repository argument to parse_commitblame.c builtin/checkout.c builtin/commit.c +20 more+55 -470 replies
145/194commit: add repository argument to set_commit_bufferblame.c commit.c commit.h +1 more+6 -50 replies
146/194commit: add repository argument to get_cached_commit_bufferbuiltin/rev-list.c commit.c commit.h +3 more+8 -70 replies
147/194commit: add repository argument to unuse_commit_bufferbuiltin/am.c builtin/blame.c builtin/fast-export.c +14 more+38 -280 replies
148/194commit: add repository argument to free_commit_bufferbuiltin/fsck.c builtin/log.c builtin/rev-list.c +2 more+7 -60 replies
149/194commit: allow commit buffer functions to handle arbitrary repositoriesbuiltin/index-pack.c commit.c commit.h +2 more+42 -220 replies
150/194tree: allow lookup_tree to handle arbitrary repositoriestree.c tree.h+6 -70 replies
151/194cache: convert get_graft_file to handle arbitrary repositoriescache.h commit.c environment.c+5 -50 replies
152/194shallow: add repository argument to set_alternate_shallow_filecommit.h environment.c git.c +1 more+5 -40 replies
153/194shallow: add repository argument to register_shallowbuiltin/pack-objects.c builtin/receive-pack.c commit.h +3 more+11 -90 replies
154/194shallow: add repository argument to check_shallow_file_for_updateshallow.c+4 -30 replies
155/194shallow: add repository argument to is_repository_shallowbuiltin/fetch.c builtin/pack-objects.c builtin/prune.c +8 more+24 -160 replies
156/194migrate cached path to use the_repositoryblame.c branch.c builtin/commit.c +14 more+178 -1000 replies
157/194shallow: migrate shallow information into the object parsercommit.h object.h repository.c +1 more+39 -340 replies
158/194commit: allow prepare_commit_graft to handle arbitrary repositoriescommit.c object.h+9 -80 replies
159/194commit: allow lookup_commit_graft to handle arbitrary repositoriescommit.c commit.h+5 -60 replies
160/194commit: allow arbitrary repository argument for parse_commit_buffercommit.c commit.h+6 -70 replies
161/194commit: allow parse_commit_gently to handle arbitrary repositorycommit.c commit.h+5 -60 replies
162/194commit: add repository argument to get_merge_bases_many_0commit.c+5 -40 replies
163/194commit: add repository argument to merge_bases_manycommit.c+3 -20 replies
164/194commit: add repository argument to paint_down_to_commoncommit.c+5 -40 replies
165/194commit: allow parse_commit to handle arbitrary repositoriescommit.h+2 -30 replies
166/194commit: allow paint_down_to_common to handle arbitrary repositoriescommit.c+2 -30 replies
167/194commit: allow merge_bases_many to handle arbitrary repositoriescommit.c+4 -50 replies
168/194commit: add repository argument to remove_redundantcommit.c+4 -30 replies
169/194commit: allow remove_redundant to handle arbitrary repositoriescommit.c+3 -40 replies
170/194commit: allow get_merge_bases_many_0 to handle arbitrary repositoriescommit.c+4 -40 replies
171/194commit: add repository argument to get_merge_basesbuiltin/log.c builtin/merge.c builtin/rev-parse.c +7 more+14 -130 replies
172/194commit: allow get_merge_bases to handle arbitrary repositoriescommit.c commit.h+3 -40 replies
173/194blob: allow lookup_blob to handle arbitrary repositoriesblob.c blob.h+6 -70 replies
174/194tag: allow lookup_tag to handle arbitrary repositoriestag.c tag.h+6 -70 replies
175/194tag: allow parse_tag_buffer to handle arbitrary repositoriestag.c tag.h+6 -70 replies
176/194object: allow parse_object_buffer to handle arbitrary repositoriesobject.c object.h+10 -110 replies
177/194objects: allow check_sha1_signature to handle arbitrary repositoriesobject-store.h sha1_file.c+3 -40 replies
178/194object: allow parse_object to handle arbitrary repositoriesobject.c object.h+11 -120 replies
179/194tag: allow deref_tag to handle arbitrary repositoriestag.c tag.h+3 -50 replies
180/194commit: allow lookup_commit_reference_gently to handle arbitrary repositoriescommit.c commit.h+4 -80 replies
181/194commit: allow lookup_commit_reference to handle arbitrary repositoriescommit.c commit.h+3 -50 replies
182/194commit: add repository argument to get_commit_bufferbuiltin/fast-export.c builtin/fmt-merge-msg.c builtin/log.c +10 more+34 -190 replies
183/194commit: add repository argument to logmsg_reencodebuiltin/am.c builtin/blame.c builtin/commit.c +6 more+24 -100 replies
184/194pretty: add repository argument to format_commit_messagearchive.c builtin/commit.c builtin/fmt-merge-msg.c +10 more+43 -200 replies
185/194commit: allow get_commit_buffer to handle arbitrary repositoriescommit.c commit.h+4 -50 replies
186/194pretty: allow logmsg_reencode to handle arbitrary repositoriescommit.h pretty.c+5 -60 replies
187/194commit: add repository argument to in_merge_bases_manycommit.c commit.h remote.c +1 more+8 -60 replies
188/194commit: add repository argument to in_merge_basesbuiltin/branch.c builtin/fetch.c builtin/log.c +9 more+27 -180 replies
189/194commit: allow in_merge_bases_many to handle arbitrary repositoriescommit.c commit.h+5 -60 replies
190/194commit: allow in_merge_bases to handle arbitrary repositoriescommit.c commit.h+3 -40 replies
191/194pretty: allow format_commit_message to handle arbitrary repositoriespretty.c pretty.h+4 -60 replies
192/194submodule: add repository argument to print_submodule_summarysubmodule.c+3 -20 replies
193/194submodule: Reorder open_submodule functionsubmodule.c+27 -270 replies
194/194submodule: use submodule repos for object lookupsubmodule.c+14 -110 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 000/194] Moving global state into the repository object

This series moves a lot of global state into the repository struct. It applies on top of 2512f15446149235156528dafbe75930c712b29e (2.16.0) It can be found at https://github.com/stefanbeller/git/tree/object-store

Motivation for this series:
* Easier to reason about code when all state is stored in one place, for example for multithreading
* Easier to move to processing submodules in-process instead of calling a processes for the submodule handling.
The last patch demonstrates this.

Usually when approaching large refactoring series, a lot of tedious review work is involved and yet it is hard to be convinced the series did everything right.

When reviewing this series in particular it is hard to be convinced if any function that is converted to take the repository as an argument is fully converted or if there are any hidden dependencies that are not obvious from code review.

This is why this series tries to be reviewer friendly by utilizing machine assistance as much as possible. There are 3 types of patches in this series:

(A) <area>: add repository argument to <function_foo>
This sort of patch is just adding the repository as an argument to that function. It assumes the given repository is the_repository and has a compile time check for that assertion using a preprocessor trick. As did a compile check after each commit of the series, I don't expect the review burden on these patches to be high. Review on these patches is mostly checking for formatting errors or if I sneak in malicious code -- if you're inclined to believe that.

(B) <area>: allow <function_foo> to handle arbitrary repositories This sort of patch is touching code inside the given function only, usually replacing all occurrences of the_repository by the argument r. Here the review is critical: Did I miss any function that relies on state of the_repository ?
This series was developed by converting all functions of packfile/sha1-file/commit/etc using (A); after the demo patch was possible, all patches that did (A), but not (B) were deleted. Therefore I was confident at time of writing that patch that the conversion of a function which doesn't take a repository argument is okay.

(C) other patches, such as moving code around,
demoing this series in the last patch

This approach was chosen as I think it is review friendly, despite the huge number of patches.

A weakness of this approach is the buildup of a large series, which ignores the ongoing development. Rebasing that series turned out to be ok, but merging it with confidence is an issue.

This series was developed partially as a pair programming exercise with Jonathan Nieder and Brandon Williams.

The idea with the #define trick to separate the two very separate issues of touching a lot of code and reasoning about its correctness (hidden deps) is mostly from Jonathan Tan.

Any suggestions welcome!

Thanks,
Stefan

Brandon Williams (4):
sha1_file: allow add_to_alternates_file to handle arbitrary
repositories
commit: convert commit_graft_pos() to handle arbitrary repositories
commit: convert register_commit_graft to handle arbitrary repositories
commit: convert read_graft_file to handle arbitrary repositories

Jonathan Nieder (50):
object-store: move packed_git and packed_git_mru to object store
pack: move prepare_packed_git_run_once to object store
pack: move approximate object count to object store
pack: add repository argument to install_packed_git
pack: add repository argument to prepare_packed_git_one
pack: add repository argument to rearrange_packed_git
pack: add repository argument to prepare_packed_git_mru
pack: add repository argument to prepare_packed_git
pack: add repository argument to reprepare_packed_git
pack: add repository argument to sha1_file_name
pack: add repository argument to map_sha1_file
sha1_file: allow alt_odb_usable to handle arbitrary repositories
pack: allow install_packed_git to handle arbitrary repositories
pack: allow rearrange_packed_git to handle arbitrary repositories
pack: allow prepare_packed_git_mru to handle arbitrary repositories
pack: allow prepare_packed_git_one to handle arbitrary repositories
pack: allow prepare_packed_git to handle arbitrary repositories
pack: allow reprepare_packed_git to handle arbitrary repositories
pack: allow sha1_file_name to handle arbitrary repositories
pack: allow stat_sha1_file to handle arbitrary repositories
pack: allow open_sha1_file to handle arbitrary repositories
pack: allow map_sha1_file_1 to handle arbitrary repositories
pack: allow map_sha1_file to handle arbitrary repositories
pack: allow sha1_loose_object_info to handle arbitrary repositories
sha1_file: add repository argument to sha1_object_info_extended
object-store: move alternates API to new alternates.h
object-store: move loose object functions to new loose-object.h
pack: move struct pack_window and pack_entry to packfile.h
object-store: move replace_objects back to object-store
object-store: move lookup_replace_object to replace-object.h
pack: add repository argument to packed_object_info
pack: add repository argument to find_pack_entry
object: add repository argument to lookup_object
object: add repository argument to grow_object_hash
object: add repository argument to lookup_commit_reference_gently
object: add repository argument to lookup_commit
object: move grafts to object parser
object: add repository argument to commit_graft_pos
object: add repository argument to register_commit_graft
object: add repository argument to read_graft_file
object: add repository argument to prepare_commit_graft
object: add repository argument to lookup_commit_graft
object: add repository argument to lookup_unknown_object Rename sha1_object_info.cocci to object_store.cocci
alternates: add repository argument to add_to_alternates_memory
object-store: move check_sha1_signature to object-store.h
object-store: add repository argument to check_sha1_signature
object-store: add repository argument to read_object
object-store: add repository argument to read_sha1_file_extended
object: move read_object_with_reference to object.h

Stefan Beller (140):
repository: introduce object store field
object-store: move alt_odb_list and alt_odb_tail to object store
sha1_file: add repository argument to alt_odb_usable
sha1_file: add repository argument to link_alt_odb_entry
sha1_file: add repository argument to read_info_alternates
sha1_file: add repository argument to link_alt_odb_entries
sha1_file: add repository argument to stat_sha1_file
sha1_file: add repository argument to open_sha1_file
sha1_file: add repository argument to map_sha1_file_1
sha1_file: add repository argument to sha1_loose_object_info
object-store: add repository argument to prepare_alt_odb
object-store: add repository argument to foreach_alt_odb
object-store: allow prepare_alt_odb to handle arbitrary repositories
object-store: allow foreach_alt_odb to handle arbitrary repositories replace_object.c: rename to use dash in file name
replace-object: move replace_object to object store
object-store: move object access functions to object-store.h
replace-object: add repository argument to do_lookup_replace_object
replace-object: move replace objects prepared flag to object store
replace-object: check_replace_refs is safe in multi repo environment
refs: add repository argument to for_each_replace_ref
refs: add repository argument to get_main_ref_store
replace-object: add repository argument to register_replace_object
replace-object: add repository argument to register_replace_ref
replace-object: add repository argument to replace_object_pos
replace-object: allow replace_object_pos to handle arbitrary
repositories
replace-object: allow register_replace_object to handle arbitrary
repositories
replace-object: add repository argument to prepare_replace_object
refs: store the main ref store inside the repository struct
refs: allow for_each_replace_ref to handle arbitrary repositories
replace-object: allow prepare_replace_object to handle arbitrary
repositories
replace_object: allow do_lookup_replace_object to handle arbitrary
repositories
replace-object: add repository argument to lookup_replace_object
repository: allow lookup_replace_object to handle arbitrary
repositories
object-store: add repository argument to sha1_object_info
pack: add repository argument to retry_bad_packed_offset
pack: add repository argument to packed_to_object_type
packfile: add repository argument to read_object
packfile: add repository argument to unpack_entry
packfile: add repository argument to cache_or_unpack_entry
pack: allow find_pack_entry to handle arbitrary repositories
object-store: allow sha1_object_info to handle arbitrary repositories fetch, push: do not use submodule as alternate in has_commits check
push: add test showing bad interaction of replace refs and submodules
replace_object: allow register_replace_ref to handle arbitrary
repositories
cache.h: migrate the definition of object_id to object.h
repository: introduce object parser field
object: add repository argument to parse_object
object: add repository argument to create_object
blob: add repository argument to lookup_blob
tree: add repository argument to lookup_tree
tag: add repository argument to lookup_tag
tag: add repository argument to parse_tag_buffer
tag: add repository argument to deref_tag
object: add repository argument to lookup_commit_reference
commit: add repository argument to parse_commit_buffer
object: allow grow_object_hash to handle arbitrary repositories
object: allow create_object to handle arbitrary repositories
object: allow lookup_object to handle arbitrary repositories
object: allow lookup_unknown_object to handle arbitrary repositories
object: add repository argument to parse_object_buffer
repository: keep track of all open repositories
alternates: add repository argument to add_to_alternates_file
object-store: add repository argument to read_sha1_file
packfile: add repository argument to has_packed_and_bad
packfile: allow has_packed_and_bad to handle arbitrary repositories
streaming: add repository argument to open_istream_fn
streaming: add repository argument to open_istream
streaming: add repository argument to istream_source
streaming: allow istream_source to handle arbitrary repositories
sha1_file: allow read_object to handle arbitrary repositories object-store.h: allow read_sha1_file{_extended} to handle arbitrary
repositories
streaming: allow open_istream_incore to handle arbitrary repositories
streaming: allow open_istream_pack_non_delta to handle arbitrary
repositories
streaming: allow open_istream_loose to handle arbitrary repositories
streaming: allow open_istream to handle arbitrary repositories
alternates: convert add_to_alternates_memory to handle arbitrary repos
object: add repository argument to object_as_type
alloc: add repository argument to alloc_blob_node
alloc: add repository argument to alloc_tree_node
alloc: add repository argument to alloc_commit_node
alloc: add repository argument to alloc_tag_node
alloc: add repository argument to alloc_object_node
alloc: add repository argument to alloc_report
alloc: add repository argument to alloc_commit_index
alloc: allow arbitrary repositories for alloc functions
object: allow object_as_type to handle arbitrary repositories
commit: allow lookup_commit to handle arbitrary repositories
object: add repository argument to parse_commit_gently
commit: add repository argument to parse_commit
commit: add repository argument to set_commit_buffer
commit: add repository argument to get_cached_commit_buffer
commit: add repository argument to unuse_commit_buffer
commit: add repository argument to free_commit_buffer
commit: allow commit buffer functions to handle arbitrary repositories
tree: allow lookup_tree to handle arbitrary repositories
cache: convert get_graft_file to handle arbitrary repositories
shallow: add repository argument to set_alternate_shallow_file
shallow: add repository argument to register_shallow
shallow: add repository argument to check_shallow_file_for_update
shallow: add repository argument to is_repository_shallow migrate cached path to use the_repository
shallow: migrate shallow information into the object parser
commit: allow prepare_commit_graft to handle arbitrary repositories
commit: allow lookup_commit_graft to handle arbitrary repositories
commit: allow arbitrary repository argument for parse_commit_buffer
commit: allow parse_commit_gently to handle arbitrary repository
commit: add repository argument to get_merge_bases_many_0
commit: add repository argument to merge_bases_many
commit: add repository argument to paint_down_to_common
commit: allow parse_commit to handle arbitrary repositories
commit: allow paint_down_to_common to handle arbitrary repositories
commit: allow merge_bases_many to handle arbitrary repositories
commit: add repository argument to remove_redundant
commit: allow remove_redundant to handle arbitrary repositories
commit: allow get_merge_bases_many_0 to handle arbitrary repositories
commit: add repository argument to get_merge_bases
commit: allow get_merge_bases to handle arbitrary repositories
blob: allow lookup_blob to handle arbitrary repositories
tag: allow lookup_tag to handle arbitrary repositories
tag: allow parse_tag_buffer to handle arbitrary repositories
object: allow parse_object_buffer to handle arbitrary repositories
objects: allow check_sha1_signature to handle arbitrary repositories
object: allow parse_object to handle arbitrary repositories
tag: allow deref_tag to handle arbitrary repositories
commit: allow lookup_commit_reference_gently to handle arbitrary
repositories
commit: allow lookup_commit_reference to handle arbitrary repositories
commit: add repository argument to get_commit_buffer
commit: add repository argument to logmsg_reencode
pretty: add repository argument to format_commit_message
commit: allow get_commit_buffer to handle arbitrary repositories
pretty: allow logmsg_reencode to handle arbitrary repositories
commit: add repository argument to in_merge_bases_many
commit: add repository argument to in_merge_bases
commit: allow in_merge_bases_many to handle arbitrary repositories
commit: allow in_merge_bases to handle arbitrary repositories
pretty: allow format_commit_message to handle arbitrary repositories
submodule: add repository argument to print_submodule_summary
submodule: Reorder open_submodule function
submodule: use submodule repos for object lookup

 Makefile                                   |   2 +-
 alloc.c                                    |  48 +++--
 alternates.h                               |  68 +++++++
 apply.c                                    |   8 +-
 archive-tar.c                              |   6 +-
 archive-zip.c                              |   8 +-
 archive.c                                  |   9 +-
 bisect.c                                   |   6 +-
 blame.c                                    |  40 ++--
 blob.c                                     |  10 +-
 blob.h                                     |   2 +-
 branch.c                                   |  16 +-
 builtin/am.c                               |  14 +-
 builtin/blame.c                            |   9 +-
 builtin/branch.c                           |  11 +-
 builtin/cat-file.c                         |  28 ++-
 builtin/checkout.c                         |  12 +-
 builtin/clone.c                            |  14 +-
 builtin/commit-tree.c                      |   5 +-
 builtin/commit.c                           |  63 +++---
 builtin/count-objects.c                    |  12 +-
 builtin/describe.c                         |  19 +-
 builtin/diff-tree.c                        |   9 +-
 builtin/diff.c                             |   7 +-
 builtin/difftool.c                         |   5 +-
 builtin/fast-export.c                      |  30 +--
 builtin/fetch.c                            |  21 +-
 builtin/fmt-merge-msg.c                    |  19 +-
 builtin/fsck.c                             |  44 ++--
 builtin/gc.c                               |   8 +-
 builtin/grep.c                             |  10 +-
 builtin/hash-object.c                      |   1 +
 builtin/index-pack.c                       |  26 ++-
 builtin/log.c                              |  26 ++-
 builtin/ls-files.c                         |   2 +-
 builtin/ls-tree.c                          |   4 +-
 builtin/merge-base.c                       |  11 +-
 builtin/merge-tree.c                       |  12 +-
 builtin/merge.c                            |  41 ++--
 builtin/mktag.c                            |  10 +-
 builtin/mktree.c                           |   4 +-
 builtin/name-rev.c                         |  15 +-
 builtin/notes.c                            |  16 +-
 builtin/pack-objects.c                     |  66 +++---
 builtin/pack-redundant.c                   |   8 +-
 builtin/pack-refs.c                        |   3 +-
 builtin/prune-packed.c                     |   1 +
 builtin/prune.c                            |   8 +-
 builtin/pull.c                             |  19 +-
 builtin/receive-pack.c                     |  14 +-
 builtin/reflog.c                           |  21 +-
 builtin/remote.c                           |   1 +
 builtin/replace.c                          |  24 ++-
 builtin/reset.c                            |  11 +-
 builtin/rev-list.c                         |   7 +-
 builtin/rev-parse.c                        |  11 +-
 builtin/shortlog.c                         |   5 +-
 builtin/show-branch.c                      |   9 +-
 builtin/show-ref.c                         |   1 +
 builtin/submodule--helper.c                |   5 +-
 builtin/tag.c                              |  12 +-
 builtin/unpack-file.c                      |   4 +-
 builtin/unpack-objects.c                   |  15 +-
 builtin/verify-commit.c                    |   7 +-
 bulk-checkin.c                             |   3 +-
 bundle.c                                   |   9 +-
 cache-tree.c                               |   4 +-
 cache.h                                    | 315 ++---------------------------
 combine-diff.c                             |   5 +-
 commit.c                                   | 241 ++++++++++++----------
 commit.h                                   |  49 +++--
 config.c                                   |   2 +-
 contrib/coccinelle/cached_path.cocci       |  44 ++++
 contrib/coccinelle/object_parser.cocci     | 125 ++++++++++++
 contrib/coccinelle/object_store.cocci      |  74 +++++++
 contrib/coccinelle/packed_git.cocci        |  15 ++
 contrib/coccinelle/submodule_reading.cocci |  34 ++++
 convert.c                                  |   1 +
 diff.c                                     |   8 +-
 diffcore-rename.c                          |   1 +
 dir.c                                      |   4 +-
 entry.c                                    |   5 +-
 environment.c                              |  10 +-
 fast-import.c                              |  45 +++--
 fetch-pack.c                               |  47 +++--
 fsck.c                                     |  20 +-
 git.c                                      |   2 +-
 grep.c                                     |   5 +-
 http-backend.c                             |  12 +-
 http-push.c                                |  24 ++-
 http-walker.c                              |   5 +-
 http.c                                     |  10 +-
 line-log.c                                 |   2 +-
 list-objects-filter.c                      |   2 +-
 list-objects.c                             |   4 +-
 log-tree.c                                 |  18 +-
 loose-object.h                             |  91 +++++++++
 mailmap.c                                  |   4 +-
 match-trees.c                              |   6 +-
 merge-blobs.c                              |   8 +-
 merge-recursive.c                          |  30 +--
 mru.h                                      |   1 +
 notes-cache.c                              |   9 +-
 notes-merge.c                              |  15 +-
 notes-utils.c                              |   6 +-
 notes.c                                    |  12 +-
 object-store.h                             | 183 +++++++++++++++++
 object.c                                   | 106 +++++-----
 object.h                                   |  82 +++++++-
 pack-bitmap-write.c                        |   7 +-
 pack-bitmap.c                              |   6 +-
 pack-check.c                               |   6 +-
 pack-revindex.c                            |   1 +
 pack.h                                     |   1 +
 packfile.c                                 | 149 ++++++++------
 packfile.h                                 |  41 +++-
 parse-options-cb.c                         |   2 +-
 path.c                                     |  18 +-
 path.h                                     |  40 +++-
 pretty.c                                   |  24 ++-
 pretty.h                                   |   2 +-
 reachable.c                                |  12 +-
 read-cache.c                               |   7 +-
 ref-filter.c                               |  15 +-
 reflog-walk.c                              |   3 +-
 refs.c                                     |  87 ++++----
 refs.h                                     |   4 +-
 refs/files-backend.c                       |   2 +-
 remote-testsvn.c                           |   6 +-
 remote.c                                   |  27 ++-
 replace_object.c => replace-object.c       |  70 +++----
 replace-object.h                           |  34 ++++
 repository.c                               |  84 ++++++--
 repository.h                               |  33 ++-
 rerere.c                                   |  12 +-
 revision.c                                 |  48 ++---
 send-pack.c                                |   7 +-
 sequencer.c                                |  93 +++++----
 server-info.c                              |  12 +-
 sha1_file.c                                | 236 +++++++++++----------
 sha1_name.c                                |  75 ++++---
 shallow.c                                  | 113 ++++++-----
 streaming.c                                |  33 +--
 streaming.h                                |   2 +-
 submodule-config.c                         |   3 +-
 submodule.c                                | 100 +++++----
 t/helper/test-example-decorate.c           |   6 +-
 t/helper/test-ref-store.c                  |   6 +-
 t/helper/test-revision-walking.c           |   2 +-
 t/t5531-deep-submodule-push.sh             |  16 ++
 tag.c                                      |  36 ++--
 tag.h                                      |   7 +-
 tmp-objdir.c                               |   4 +-
 transport.c                                |   5 +-
 tree-walk.c                                |   5 +-
 tree.c                                     |  24 ++-
 tree.h                                     |   2 +-
 upload-pack.c                              |  25 ++-
 walker.c                                   |  17 +-
 wt-status.c                                |  10 +-
 xdiff-interface.c                          |   4 +-
 161 files changed, 2669 insertions(+), 1596 deletions(-)
 create mode 100644 alternates.h
 create mode 100644 contrib/coccinelle/cached_path.cocci
 create mode 100644 contrib/coccinelle/object_parser.cocci
 create mode 100644 contrib/coccinelle/object_store.cocci
 create mode 100644 contrib/coccinelle/packed_git.cocci
 create mode 100644 contrib/coccinelle/submodule_reading.cocci
 create mode 100644 loose-object.h
 create mode 100644 object-store.h
 rename replace_object.c => replace-object.c (55%)
 create mode 100644 replace-object.h
Signature · 1 line
2.15.1.433.g936d1b9894.dirty