[PATCH 0/5] pack-write: cleanup usage of global variables
- From
Karthik Nayak via B4 Relay <devnull+karthik.188.gmail.com@kernel.org>
- Date
- Jan 16, 2025, 11:35 UTC
- Message-ID
- <20250116-kn-the-repo-cleanup-v1-0-a2f4c8e1c4c3@gmail.com>
This is a small series to remove global variable usage from `pack-write.c`. Mostly it bubble's up the usage of global variables to upper layers. The only exception is in `write-midx.c`, which was cleaned of global variable usage, so there, we use the repo that is in available in the context.
This series is based on fbe8d3079d (Git 2.48, 2025-01-10) with 'ps/more-sign-compare' and 'ps/the-repository' merged in.
There are no conflicts with topics in 'next', however there is a conflict with 'tb/incremental-midx-part-2' in 'seen', the fix is simple but happy to merge that in too if necessary.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
Karthik Nayak (5):
pack-write: pass hash_algo to `fixup_pack_header_footer()`
pack-write: pass repository to `index_pack_lockfile()`
pack-write: pass hash_algo to `write_idx_file()`
pack-write: pass hash_algo to `write_rev_file()`
pack-write: pass hash_algo to `write_rev_*()`builtin/fast-import.c | 11 +++--- builtin/index-pack.c | 11 +++--- builtin/pack-objects.c | 12 +++--- builtin/receive-pack.c | 2 +- bulk-checkin.c | 7 ++-- fetch-pack.c | 4 +- midx-write.c | 4 +- pack-write.c | 99 +++++++++++++++++++++++++++----------------------- pack.h | 30 ++++++++++++--- 9 files changed, 106 insertions(+), 74 deletions(-) ---
---
base-commit: 8b2efc058aaa3d1437678616bccf7c5f7ce1f92b change-id: 20250110-kn-the-repo-cleanup-44144fa42dc3
Thanks - Karthik