git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 16/20] packfile: pass down repository to `open_pack_index`

From
Karthik Nayak <karthik.188@gmail.com>
Date
Oct 21, 2024, 09:57 UTC
Message-ID
<37cbd46efdc14203366a9017dcafc90cf3a938de.1729504641.git.karthik.188@gmail.com>
In-Reply-To
<cover.1729504640.git.karthik.188@gmail.com>

The function `open_pack_index` currently relies on the global variable `the_repository`. To eliminate global variable usage in `packfile.c`, we should progressively shift the dependency on the_repository to higher layers. Let's remove its usage from this function and any related ones.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 builtin/count-objects.c     |  2 +-
 builtin/fsck.c              |  2 +-
 builtin/index-pack.c        |  2 +-
 builtin/pack-objects.c      |  6 +++---
 builtin/pack-redundant.c    |  2 +-
 builtin/repack.c            |  2 +-
 commit-graph.c              |  2 +-
 midx-write.c                | 10 +++++-----
 midx.c                      |  2 +-
 object-name.c               |  4 ++--
 pack-check.c                |  2 +-
 pack-mtimes.c               |  4 ++--
 pack-mtimes.h               |  3 ++-
 pack-revindex.c             |  4 ++--
 packfile.c                  | 26 ++++++++++++++------------
 packfile.h                  |  5 +++--
 reachable.c                 |  2 +-
 t/helper/test-pack-mtimes.c |  2 +-
 18 files changed, 43 insertions(+), 39 deletions(-)
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index 1e89148ed7..b122b51fe1 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -131,7 +131,7 @@ int cmd_count_objects(int argc,
 		for (p = get_all_packs(the_repository); p; p = p->next) {
 			if (!p->pack_local)
 				continue;
-			if (open_pack_index(p))
+			if (open_pack_index(the_repository, p))
 				continue;
 			packed += p->num_objects;
 			size_pack += p->pack_size + p->index_size;
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 0e4b7ec3af..86006e5bbc 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -988,7 +988,7 @@ int cmd_fsck(int argc,
 			if (show_progress) {
 				for (p = get_all_packs(the_repository); p;
 				     p = p->next) {
-					if (open_pack_index(p))
+					if (open_pack_index(the_repository, p))
 						continue;
 					total += p->num_objects;
 				}
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index eaefb41761..1898dc37a6 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1656,7 +1656,7 @@ static void read_idx_option(struct pack_idx_option *opts, const char *pack_name)
 
 	if (!p)
 		die(_("Cannot open existing pack file '%s'"), pack_name);
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		die(_("Cannot open existing pack idx file for '%s'"), pack_name);
 
 	/* Read the attributes from the existing idx file */
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index bfe0197d12..ffbd48c60c 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3902,7 +3902,7 @@ static void show_edge(struct commit *commit)
 	add_preferred_base(&commit->object.oid);
 }
 
-static int add_object_in_unpacked_pack(struct repository *repo UNUSED,
+static int add_object_in_unpacked_pack(struct repository *repo,
 				       const struct object_id *oid,
 				       struct packed_git *pack,
 				       uint32_t pos,
@@ -3913,7 +3913,7 @@ static int add_object_in_unpacked_pack(struct repository *repo UNUSED,
 		time_t mtime;
 
 		if (pack->is_cruft) {
-			if (load_pack_mtimes(pack) < 0)
+			if (load_pack_mtimes(repo, pack) < 0)
 				die(_("could not load cruft pack .mtimes"));
 			mtime = nth_packed_mtime(pack, pos);
 		} else {
@@ -4035,7 +4035,7 @@ static void loosen_unused_packed_objects(void)
 		if (!p->pack_local || p->pack_keep || p->pack_keep_in_core)
 			continue;
 
-		if (open_pack_index(p))
+		if (open_pack_index(the_repository, p))
 			die(_("cannot open pack index"));
 
 		for (i = 0; i < p->num_objects; i++) {
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 60f806e672..bc3c3e9c4e 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -545,7 +545,7 @@ static struct pack_list * add_pack(struct packed_git *p)
 	l.pack = p;
 	llist_init(&l.remaining_objects);
 
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		return NULL;
 
 	base = p->index_data;
diff --git a/builtin/repack.c b/builtin/repack.c
index de03a3ecfc..5f317ba224 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -461,7 +461,7 @@ struct pack_geometry {
 
 static uint32_t geometry_pack_weight(struct packed_git *p)
 {
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		die(_("cannot open index for %s"), p->pack_name);
 	return p->num_objects;
 }
diff --git a/commit-graph.c b/commit-graph.c
index 96d55f8885..35e4e9d99d 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1920,7 +1920,7 @@ static int fill_oids_from_packs(struct write_commit_graph_context *ctx,
 			ret = error(_("error adding pack %s"), packname.buf);
 			goto cleanup;
 		}
-		if (open_pack_index(p)) {
+		if (open_pack_index(the_repository, p)) {
 			ret = error(_("error opening index for %s"), packname.buf);
 			goto cleanup;
 		}
diff --git a/midx-write.c b/midx-write.c
index 4696b8326c..2b7c50d25c 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -161,7 +161,7 @@ static void add_pack_to_midx(const char *full_path, size_t full_path_len,
 			return;
 		}
 
-		if (open_pack_index(p)) {
+		if (open_pack_index(the_repository, p)) {
 			warning(_("failed to open pack-index '%s'"),
 				full_path);
 			close_pack(p);
@@ -301,8 +301,8 @@ static void midx_fanout_add_pack_fanout(struct midx_fanout *fanout,
 	uint32_t cur_object;
 
 	if (cur_fanout)
-		start = get_pack_fanout(pack, cur_fanout - 1);
-	end = get_pack_fanout(pack, cur_fanout);
+		start = get_pack_fanout(the_repository, pack, cur_fanout - 1);
+	end = get_pack_fanout(the_repository, pack, cur_fanout);
 
 	for (cur_object = start; cur_object < end; cur_object++) {
 		midx_fanout_grow(fanout, fanout->nr + 1);
@@ -950,7 +950,7 @@ static int fill_packs_from_midx(struct write_midx_context *ctx,
 					return 1;
 				}
 
-				if (open_pack_index(m->packs[i]))
+				if (open_pack_index(the_repository, m->packs[i]))
 					die(_("could not open index for %s"),
 					    m->packs[i]->pack_name);
 			}
@@ -1612,7 +1612,7 @@ static int want_included_pack(struct repository *r,
 		return 0;
 	if (p->is_cruft)
 		return 0;
-	if (open_pack_index(p) || !p->num_objects)
+	if (open_pack_index(r, p) || !p->num_objects)
 		return 0;
 	return 1;
 }
diff --git a/midx.c b/midx.c
index c76df95d6d..edbd2008e3 100644
--- a/midx.c
+++ b/midx.c
@@ -966,7 +966,7 @@ int verify_midx_file(struct repository *r, const char *object_dir, unsigned flag
 			continue;
 		}
 
-		if (open_pack_index(e.p)) {
+		if (open_pack_index(the_repository, e.p)) {
 			midx_report(_("failed to load pack-index for packfile %s"),
 				    e.p->pack_name);
 			break;
diff --git a/object-name.c b/object-name.c
index 43023884ef..368242133a 100644
--- a/object-name.c
+++ b/object-name.c
@@ -175,7 +175,7 @@ static void unique_in_pack(struct packed_git *p,
 	if (p->multi_pack_index)
 		return;
 
-	if (open_pack_index(p) || !p->num_objects)
+	if (open_pack_index(ds->repo, p) || !p->num_objects)
 		return;
 
 	num = p->num_objects;
@@ -761,7 +761,7 @@ static void find_abbrev_len_for_pack(struct packed_git *p,
 	if (p->multi_pack_index)
 		return;
 
-	if (open_pack_index(p) || !p->num_objects)
+	if (open_pack_index(mad->repo, p) || !p->num_objects)
 		return;
 
 	num = p->num_objects;
diff --git a/pack-check.c b/pack-check.c
index a5551809c1..d93cf3f224 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -176,7 +176,7 @@ int verify_pack_index(struct packed_git *p)
 {
 	int err = 0;
 
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		return error("packfile %s index not opened", p->pack_name);
 
 	/* Verify SHA1 sum of the index file */
diff --git a/pack-mtimes.c b/pack-mtimes.c
index cdf30b8d2b..a9fa8d55de 100644
--- a/pack-mtimes.c
+++ b/pack-mtimes.c
@@ -97,7 +97,7 @@ static int load_pack_mtimes_file(char *mtimes_file,
 	return ret;
 }
 
-int load_pack_mtimes(struct packed_git *p)
+int load_pack_mtimes(struct repository *repo, struct packed_git *p)
 {
 	char *mtimes_name = NULL;
 	int ret = 0;
@@ -107,7 +107,7 @@ int load_pack_mtimes(struct packed_git *p)
 	if (p->mtimes_map)
 		return ret; /* already loaded */
 
-	ret = open_pack_index(p);
+	ret = open_pack_index(repo, p);
 	if (ret < 0)
 		goto cleanup;
 
diff --git a/pack-mtimes.h b/pack-mtimes.h
index 107327cec0..22ab6a8481 100644
--- a/pack-mtimes.h
+++ b/pack-mtimes.h
@@ -5,12 +5,13 @@
 #define MTIMES_VERSION 1
 
 struct packed_git;
+struct repository;
 
 /*
  * Loads the .mtimes file corresponding to "p", if any, returning zero
  * on success.
  */
-int load_pack_mtimes(struct packed_git *p);
+int load_pack_mtimes(struct repository *repo, struct packed_git *p);
 
 /* Returns the mtime associated with the object at position "pos" (in
  * lexicographic/index order) in pack "p".
diff --git a/pack-revindex.c b/pack-revindex.c
index 22d3c23464..c14ef971da 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -178,7 +178,7 @@ static int create_pack_revindex_in_memory(struct packed_git *p)
 	if (git_env_bool(GIT_TEST_REV_INDEX_DIE_IN_MEMORY, 0))
 		die("dying as requested by '%s'",
 		    GIT_TEST_REV_INDEX_DIE_IN_MEMORY);
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		return -1;
 	create_pack_revindex(p);
 	return 0;
@@ -274,7 +274,7 @@ int load_pack_revindex_from_disk(struct packed_git *p)
 {
 	char *revindex_name;
 	int ret;
-	if (open_pack_index(p))
+	if (open_pack_index(the_repository, p))
 		return -1;
 
 	revindex_name = pack_revindex_filename(p);
diff --git a/packfile.c b/packfile.c
index 831d2c2c74..b0147231cb 100644
--- a/packfile.c
+++ b/packfile.c
@@ -84,13 +84,14 @@ void pack_report(void)
  * consistency checks, then record its information to p.  Return 0 on
  * success.
  */
-static int check_packed_git_idx(const char *path, struct packed_git *p)
+static int check_packed_git_idx(struct repository *repo, const char *path,
+				struct packed_git *p)
 {
 	void *idx_map;
 	size_t idx_size;
 	int fd = git_open(path), ret;
 	struct stat st;
-	const unsigned int hashsz = the_hash_algo->rawsz;
+	const unsigned int hashsz = repo->hash_algo->rawsz;
 
 	if (fd < 0)
 		return -1;
@@ -194,7 +195,7 @@ int load_idx(const char *path, const unsigned int hashsz, void *idx_map,
 	return 0;
 }
 
-int open_pack_index(struct packed_git *p)
+int open_pack_index(struct repository *repo, struct packed_git *p)
 {
 	char *idx_name;
 	size_t len;
@@ -206,17 +207,18 @@ int open_pack_index(struct packed_git *p)
 	if (!strip_suffix(p->pack_name, ".pack", &len))
 		BUG("pack_name does not end in .pack");
 	idx_name = xstrfmt("%.*s.idx", (int)len, p->pack_name);
-	ret = check_packed_git_idx(idx_name, p);
+	ret = check_packed_git_idx(repo, idx_name, p);
 	free(idx_name);
 	return ret;
 }
 
-uint32_t get_pack_fanout(struct packed_git *p, uint32_t value)
+uint32_t get_pack_fanout(struct repository *repo, struct packed_git *p,
+			 uint32_t value)
 {
 	const uint32_t *level1_ofs = p->index_data;
 
 	if (!level1_ofs) {
-		if (open_pack_index(p))
+		if (open_pack_index(repo, p))
 			return 0;
 		level1_ofs = p->index_data;
 	}
@@ -246,7 +248,7 @@ struct packed_git *parse_pack_index(struct repository *repo,
 
 	memcpy(p->pack_name, path, alloc); /* includes NUL */
 	hashcpy(p->hash, sha1, repo->hash_algo);
-	if (check_packed_git_idx(idx_path, p)) {
+	if (check_packed_git_idx(repo, idx_path, p)) {
 		free(p);
 		return NULL;
 	}
@@ -544,7 +546,7 @@ static int open_packed_git_1(struct repository *repo, struct packed_git *p)
 	ssize_t read_result;
 	const unsigned hashsz = the_hash_algo->rawsz;
 
-	if (open_pack_index(p))
+	if (open_pack_index(repo, p))
 		return error("packfile %s index unavailable", p->pack_name);
 
 	if (!pack_max_fds) {
@@ -951,7 +953,7 @@ unsigned long repo_approximate_object_count(struct repository *r)
 		for (m = get_multi_pack_index(r); m; m = m->next)
 			count += m->num_objects;
 		for (p = r->objects->packed_git; p; p = p->next) {
-			if (open_pack_index(p))
+			if (open_pack_index(r, p))
 				continue;
 			count += p->num_objects;
 		}
@@ -1923,7 +1925,7 @@ int nth_packed_object_id(struct repository *repo, struct object_id *oid,
 	const unsigned char *index = p->index_data;
 	const unsigned int hashsz = repo->hash_algo->rawsz;
 	if (!index) {
-		if (open_pack_index(p))
+		if (open_pack_index(repo, p))
 			return -1;
 		index = p->index_data;
 	}
@@ -1983,7 +1985,7 @@ off_t find_pack_entry_one(struct repository *repo, const unsigned char *sha1,
 	uint32_t result;
 
 	if (!index) {
-		if (open_pack_index(p))
+		if (open_pack_index(repo, p))
 			return 0;
 	}
 
@@ -2226,7 +2228,7 @@ int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
 		if ((flags & FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS) &&
 		    p->pack_keep)
 			continue;
-		if (open_pack_index(p)) {
+		if (open_pack_index(repo, p)) {
 			pack_errors = 1;
 			continue;
 		}
diff --git a/packfile.h b/packfile.h
index afec4bbd74..98ec3616b4 100644
--- a/packfile.h
+++ b/packfile.h
@@ -97,7 +97,7 @@ void pack_report(void);
  * mmap the index file for the specified packfile (if it is not
  * already mmapped).  Return 0 on success.
  */
-int open_pack_index(struct packed_git *);
+int open_pack_index(struct repository *repo, struct packed_git *);
 
 /*
  * munmap the index file for the specified packfile (if it is
@@ -107,7 +107,8 @@ void close_pack_index(struct packed_git *);
 
 int close_pack_fd(struct packed_git *p);
 
-uint32_t get_pack_fanout(struct packed_git *p, uint32_t value);
+uint32_t get_pack_fanout(struct repository *repo, struct packed_git *p,
+			 uint32_t value);
 
 struct raw_object_store;
 
diff --git a/reachable.c b/reachable.c
index f8dc2731d6..833013e7a3 100644
--- a/reachable.c
+++ b/reachable.c
@@ -291,7 +291,7 @@ static int add_recent_packed(struct repository *repo,
 	if (obj && obj->flags & SEEN)
 		return 0;
 	if (p->is_cruft) {
-		if (load_pack_mtimes(p) < 0)
+		if (load_pack_mtimes(repo, p) < 0)
 			die(_("could not load cruft pack .mtimes"));
 		mtime = nth_packed_mtime(p, pos);
 	}
diff --git a/t/helper/test-pack-mtimes.c b/t/helper/test-pack-mtimes.c
index ebd980b308..b1caeba097 100644
--- a/t/helper/test-pack-mtimes.c
+++ b/t/helper/test-pack-mtimes.c
@@ -11,7 +11,7 @@
 static void dump_mtimes(struct packed_git *p)
 {
 	uint32_t i;
-	if (load_pack_mtimes(p) < 0)
+	if (load_pack_mtimes(the_repository, p) < 0)
 		die("could not load pack .mtimes");
 
 	for (i = 0; i < p->num_objects; i++) {
-- 
2.47.0
Previous: Karthik NayakNext: Karthik Nayak
Message 21 of 171 in “packfile: avoid using the 'the_repository' global variable”
  1. 00/20 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Oct 21, 2024
  2. 01/20 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Oct 21, 2024
  3. Taylor BlauOct 21, 2024
  4. karthik nayakOct 22, 2024
  5. Taylor BlauOct 22, 2024
  6. 02/20 packfile: pass down repository to `unuse_one_window`Karthik Nayak, Oct 21, 2024
  7. Taylor BlauOct 21, 2024
  8. 03/20 packfile: pass down repository to `close_one_pack`Karthik Nayak, Oct 21, 2024
  9. 04/20 packfile: pass down repository to `add_packed_git`Karthik Nayak, Oct 21, 2024
  10. 05/20 packfile: pass down repository to `unpack_object_header`Karthik Nayak, Oct 21, 2024
  11. 06/20 packfile: pass down repository to `get_delta_base`Karthik Nayak, Oct 21, 2024
  12. 07/20 packfile: use provided repository in `packed_object_info`Karthik Nayak, Oct 21, 2024
  13. 08/20 packfile: pass down repository to `unpack_compressed_entry`Karthik Nayak, Oct 21, 2024
  14. 09/20 packfile: pass down repository to `nth_packed_object_id`Karthik Nayak, Oct 21, 2024
  15. 10/20 packfile: pass down repository to `find_pack_entry_one`Karthik Nayak, Oct 21, 2024
  16. 11/20 packfile: pass down repository to `fill_pack_entry`Karthik Nayak, Oct 21, 2024
  17. 12/20 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Oct 21, 2024
  18. 13/20 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Oct 21, 2024
  19. 14/20 packfile: pass down repository to `is_promisor_object`Karthik Nayak, Oct 21, 2024
  20. 15/20 object-store: pass down repository to `each_packed_object_fn`Karthik Nayak, Oct 21, 2024
  21. 16/20 packfile: pass down repository to `open_pack_index`Karthik Nayak, Oct 21, 2024
  22. 17/20 packfile: stop using 'the_hash_algo'Karthik Nayak, Oct 21, 2024
  23. 18/20 packfile: pass down repository to `nth_packed_object_offset`Karthik Nayak, Oct 21, 2024
  24. 19/20 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Oct 21, 2024
  25. 20/20 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Oct 21, 2024
  26. Taylor BlauOct 21, 2024
  27. karthik nayakOct 27, 2024
  28. Taylor BlauOct 27, 2024
  29. Jeff KingOct 28, 2024
  30. karthik nayakOct 28, 2024
  31. Taylor BlauOct 28, 2024
  32. 0/8 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Oct 28, 2024
  33. 1/8 packfile: add repository to struct `packed_git`Karthik Nayak, Oct 28, 2024
  34. Taylor BlauOct 28, 2024
  35. karthik nayakOct 29, 2024
  36. Taylor BlauOct 29, 2024
  37. 2/8 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Oct 28, 2024
  38. Taylor BlauOct 28, 2024
  39. karthik nayakOct 29, 2024
  40. 3/8 packfile: pass `repository` to static function in the fileKarthik Nayak, Oct 28, 2024
  41. Taylor BlauOct 28, 2024
  42. 5/8 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Oct 28, 2024
  43. Taylor BlauOct 28, 2024
  44. karthik nayakOct 29, 2024
  45. 4/8 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Oct 28, 2024
  46. Taylor BlauOct 28, 2024
  47. Jeff KingOct 29, 2024
  48. karthik nayakOct 29, 2024
  49. Taylor BlauOct 29, 2024
  50. 6/8 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Oct 28, 2024
  51. 7/8 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Oct 28, 2024
  52. me@ttaylorr.comOct 28, 2024
  53. karthik nayakOct 29, 2024
  54. 8/8 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Oct 28, 2024
  55. Taylor BlauOct 28, 2024
  56. karthik nayakOct 29, 2024
  57. Taylor BlauOct 29, 2024
  58. 0/9 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Oct 31, 2024
  59. 1/9 packfile: add repository to struct `packed_git`Karthik Nayak, Oct 31, 2024
  60. 2/9 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Oct 31, 2024
  61. 3/9 packfile: pass `repository` to static function in the fileKarthik Nayak, Oct 31, 2024
  62. 4/9 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Oct 31, 2024
  63. 5/9 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Oct 31, 2024
  64. 6/9 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Oct 31, 2024
  65. 7/9 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Oct 31, 2024
  66. 8/9 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Oct 31, 2024
  67. Jeff KingNov 1, 2024
  68. Taylor BlauNov 1, 2024
  69. karthik nayakNov 4, 2024
  70. 9/9 midx: add repository to `multi_pack_index` structKarthik Nayak, Oct 31, 2024
  71. Taylor BlauOct 31, 2024
  72. Taylor BlauNov 1, 2024
  73. karthik nayakNov 1, 2024
  74. Jeff KingNov 1, 2024
  75. karthik nayakNov 4, 2024
  76. Jeff KingNov 4, 2024
  77. 0/9 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Nov 4, 2024
  78. 1/9 packfile: add repository to struct `packed_git`Karthik Nayak, Nov 4, 2024
  79. 2/9 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Nov 4, 2024
  80. 3/9 packfile: pass `repository` to static function in the fileKarthik Nayak, Nov 4, 2024
  81. 4/9 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Nov 4, 2024
  82. 5/9 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Nov 4, 2024
  83. 6/9 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Nov 4, 2024
  84. 7/9 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Nov 4, 2024
  85. 8/9 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Nov 4, 2024
  86. Jeff KingNov 4, 2024
  87. karthik nayakNov 5, 2024
  88. 9/9 midx: add repository to `multi_pack_index` structKarthik Nayak, Nov 4, 2024
  89. Jeff KingNov 4, 2024
  90. karthik nayakNov 5, 2024
  91. 0/9 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Nov 7, 2024
  92. 1/9 packfile: add repository to struct `packed_git`Karthik Nayak, Nov 7, 2024
  93. 2/9 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Nov 7, 2024
  94. 3/9 packfile: pass `repository` to static function in the fileKarthik Nayak, Nov 7, 2024
  95. 4/9 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Nov 7, 2024
  96. 5/9 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Nov 7, 2024
  97. 6/9 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Nov 7, 2024
  98. 7/9 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Nov 7, 2024
  99. 8/9 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Nov 7, 2024
  100. Junio C HamanoNov 8, 2024
  101. karthik nayakNov 8, 2024
  102. 9/9 midx: add repository to `multi_pack_index` structKarthik Nayak, Nov 7, 2024
  103. Junio C HamanoNov 8, 2024
  104. karthik nayakNov 8, 2024
  105. 0/9 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Nov 11, 2024
  106. 1/9 packfile: add repository to struct `packed_git`Karthik Nayak, Nov 11, 2024
  107. Toon ClaesNov 13, 2024
  108. karthik nayakNov 13, 2024
  109. Junio C HamanoNov 13, 2024
  110. karthik nayakNov 14, 2024
  111. Taylor BlauNov 20, 2024
  112. karthik nayakNov 21, 2024
  113. 2/9 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Nov 11, 2024
  114. 3/9 packfile: pass `repository` to static function in the fileKarthik Nayak, Nov 11, 2024
  115. 5/9 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Nov 11, 2024
  116. 4/9 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Nov 11, 2024
  117. 6/9 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Nov 11, 2024
  118. Taylor BlauNov 20, 2024
  119. packfile.c: remove unnecessary prepare_packed_git() callTaylor Blau, Nov 20, 2024
  120. Jeff KingNov 21, 2024
  121. 7/9 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Nov 11, 2024
  122. Taylor BlauNov 20, 2024
  123. Jeff KingNov 21, 2024
  124. karthik nayakNov 21, 2024
  125. 8/9 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Nov 11, 2024
  126. 9/9 midx: add repository to `multi_pack_index` structKarthik Nayak, Nov 11, 2024
  127. Jeff KingNov 12, 2024
  128. karthik nayakNov 13, 2024
  129. Taylor BlauNov 20, 2024
  130. karthik nayakNov 21, 2024
  131. 00/10 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Nov 22, 2024
  132. 01/10 packfile: add repository to struct `packed_git`Karthik Nayak, Nov 22, 2024
  133. 03/10 packfile: pass `repository` to static function in the fileKarthik Nayak, Nov 22, 2024
  134. 02/10 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Nov 22, 2024
  135. 04/10 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Nov 22, 2024
  136. 05/10 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Nov 22, 2024
  137. 06/10 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Nov 22, 2024
  138. 07/10 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Nov 22, 2024
  139. Junio C HamanoNov 26, 2024
  140. karthik nayakNov 26, 2024
  141. 08/10 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Nov 22, 2024
  142. 09/10 midx: add repository to `multi_pack_index` structKarthik Nayak, Nov 22, 2024
  143. 10/10 packfile.c: remove unnecessary prepare_packed_git() callKarthik Nayak, Nov 22, 2024
  144. 00/10 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Nov 26, 2024
  145. 01/10 packfile: add repository to struct `packed_git`Karthik Nayak, Nov 26, 2024
  146. Kristoffer HaugsbakkNov 27, 2024
  147. karthik nayakNov 27, 2024
  148. 02/10 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Nov 26, 2024
  149. 03/10 packfile: pass `repository` to static function in the fileKarthik Nayak, Nov 26, 2024
  150. Kristoffer HaugsbakkNov 27, 2024
  151. karthik nayakNov 27, 2024
  152. 04/10 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Nov 26, 2024
  153. 05/10 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Nov 26, 2024
  154. 06/10 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Nov 26, 2024
  155. 08/10 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Nov 26, 2024
  156. 07/10 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Nov 26, 2024
  157. 09/10 midx: add repository to `multi_pack_index` structKarthik Nayak, Nov 26, 2024
  158. 10/10 packfile.c: remove unnecessary prepare_packed_git() callKarthik Nayak, Nov 26, 2024
  159. 00/10 packfile: avoid using the 'the_repository' global variableKarthik Nayak, Dec 3, 2024
  160. 01/10 packfile: add repository to struct `packed_git`Karthik Nayak, Dec 3, 2024
  161. 02/10 packfile: use `repository` from `packed_git` directlyKarthik Nayak, Dec 3, 2024
  162. 03/10 packfile: pass `repository` to static function in the fileKarthik Nayak, Dec 3, 2024
  163. 04/10 packfile: pass down repository to `odb_pack_name`Karthik Nayak, Dec 3, 2024
  164. 05/10 packfile: pass down repository to `has_object[_kept]_pack`Karthik Nayak, Dec 3, 2024
  165. 06/10 packfile: pass down repository to `for_each_packed_object`Karthik Nayak, Dec 3, 2024
  166. 07/10 config: make `delta_base_cache_limit` a non-global variableKarthik Nayak, Dec 3, 2024
  167. 08/10 config: make `packed_git_(limit|window_size)` non-global variablesKarthik Nayak, Dec 3, 2024
  168. 10/10 packfile.c: remove unnecessary prepare_packed_git() callKarthik Nayak, Dec 3, 2024
  169. 09/10 midx: add repository to `multi_pack_index` structKarthik Nayak, Dec 3, 2024
  170. Kristoffer HaugsbakkDec 3, 2024
  171. Junio C HamanoDec 3, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.