Skip to content

Commit

Permalink
pack-objects: don't reuse deltas with path-walk
Browse files Browse the repository at this point in the history
The pack.usePathWalk config is intended to reduce the size of a packfile
when constructed during a command such as 'git push'.

Signed-off-by: Derrick Stolee <[email protected]>
  • Loading branch information
derrickstolee committed Nov 16, 2024
1 parent e1c75f9 commit 29620ac
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -4779,13 +4779,20 @@ int cmd_pack_objects(int argc,

if (path_walk < 0) {
if (use_bitmap_index > 0 ||
!use_internal_rev_list)
!use_internal_rev_list) {
path_walk = 0;
else if (the_repository->gitdir &&
the_repository->settings.pack_use_path_walk)
} else if (the_repository->gitdir &&
the_repository->settings.pack_use_path_walk) {
path_walk = 1;
else
/*
* If we are using config to enforce this, then
* let's make sure we're getting the most out of
* our compression by ignoring existing deltas.
*/
reuse_delta = 0;
} else {
path_walk = git_env_bool("GIT_TEST_PACK_PATH_WALK", 0);
}
}

if (depth < 0)
Expand Down

0 comments on commit 29620ac

Please sign in to comment.