cocci: apply the "packfile.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "packfile.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
bab821646a
commit
afe27c8894
@ -284,7 +284,7 @@ static uint64_t total_ram(void)
|
|||||||
|
|
||||||
static uint64_t estimate_repack_memory(struct packed_git *pack)
|
static uint64_t estimate_repack_memory(struct packed_git *pack)
|
||||||
{
|
{
|
||||||
unsigned long nr_objects = approximate_object_count();
|
unsigned long nr_objects = repo_approximate_object_count(the_repository);
|
||||||
size_t os_cache, heap;
|
size_t os_cache, heap;
|
||||||
|
|
||||||
if (!pack || !nr_objects)
|
if (!pack || !nr_objects)
|
||||||
|
@ -2360,7 +2360,7 @@ int write_commit_graph(struct object_directory *odb,
|
|||||||
replace = ctx->opts->split_flags & COMMIT_GRAPH_SPLIT_REPLACE;
|
replace = ctx->opts->split_flags & COMMIT_GRAPH_SPLIT_REPLACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->approx_nr_objects = approximate_object_count();
|
ctx->approx_nr_objects = repo_approximate_object_count(the_repository);
|
||||||
|
|
||||||
if (ctx->append && ctx->r->objects->commit_graph) {
|
if (ctx->append && ctx->r->objects->commit_graph) {
|
||||||
struct commit_graph *g = ctx->r->objects->commit_graph;
|
struct commit_graph *g = ctx->r->objects->commit_graph;
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
|
|
|
|
||||||
- format_commit_message
|
- format_commit_message
|
||||||
+ repo_format_commit_message
|
+ repo_format_commit_message
|
||||||
|
// packfile.h
|
||||||
|
|
|
||||||
|
- approximate_object_count
|
||||||
|
+ repo_approximate_object_count
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
+ the_repository,
|
+ the_repository,
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
@@
|
@@
|
||||||
@@
|
@@
|
||||||
(
|
(
|
||||||
// packfile.h
|
|
||||||
- approximate_object_count
|
|
||||||
+ repo_approximate_object_count
|
|
||||||
// promisor-remote.h
|
// promisor-remote.h
|
||||||
|
|
|
||||||
- promisor_remote_reinit
|
- promisor_remote_reinit
|
||||||
+ repo_promisor_remote_reinit
|
+ repo_promisor_remote_reinit
|
||||||
|
|
|
|
||||||
|
@ -65,7 +65,6 @@ struct packed_git *get_all_packs(struct repository *r);
|
|||||||
* for speed.
|
* for speed.
|
||||||
*/
|
*/
|
||||||
unsigned long repo_approximate_object_count(struct repository *r);
|
unsigned long repo_approximate_object_count(struct repository *r);
|
||||||
#define approximate_object_count() repo_approximate_object_count(the_repository)
|
|
||||||
|
|
||||||
struct packed_git *find_sha1_pack(const unsigned char *sha1,
|
struct packed_git *find_sha1_pack(const unsigned char *sha1,
|
||||||
struct packed_git *packs);
|
struct packed_git *packs);
|
||||||
|
Loading…
Reference in New Issue
Block a user