git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] odb: track commit graphs via object source
@ 2025-09-04 12:49 Patrick Steinhardt
  2025-09-04 12:49 ` [PATCH 1/6] blame: drop explicit check for commit graph Patrick Steinhardt
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Patrick Steinhardt @ 2025-09-04 12:49 UTC (permalink / raw)
  To: git

Hi,

commit graphs are currently stored on the object database level. This
doesn't really make much sense conceptually, given that commit graphs
are specific to one object source. Furthermore, with the upcoming
pluggable object database effort, an object source's backend may not
evene have a commit graph in the first place but store that information
in a different format altogether.

This patch series prepares for that by moving the commit graph from
`struct object_database` into `struct odb_source`.

There's a trivial conflict with tc/last-modified that can be solved like
this:

diff --cc commit-graph.c
index 9929c1ed87,2f20f66cfd..0000000000
--- a/commit-graph.c
+++ b/commit-graph.c
@@@ -823,7 -812,12 +823,11 @@@ int corrected_commit_dates_enabled(stru
  
  struct bloom_filter_settings *get_bloom_filter_settings(struct repository *r)
  {
 -	struct commit_graph *g;
 +	struct commit_graph *g = prepare_commit_graph(r);
+ 
 -	if (!prepare_commit_graph(r))
++	if (!g)
+ 	       return NULL;
+ 
 -	g = r->objects->commit_graph;
  	while (g) {
  		if (g->bloom_filter_settings)
  			return g->bloom_filter_settings;

Thanks!

Patrick

---
Patrick Steinhardt (6):
      blame: drop explicit check for commit graph
      revision: drop explicit check for commit graph
      commit-graph: return the prepared commit graph from `prepare_commit_graph()`
      commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`
      commit-graph: pass graphs that are to be merged as parameter
      odb: move commit-graph into the object sources

 blame.c        |   3 -
 bloom.c        |   8 ++-
 commit-graph.c | 177 +++++++++++++++++++++++++++++++--------------------------
 commit-graph.h |  14 ++---
 odb.c          |   9 +--
 odb.h          |   6 +-
 packfile.c     |   3 +-
 revision.c     |   3 -
 8 files changed, 118 insertions(+), 105 deletions(-)


---
base-commit: 2462961280690837670d997bde64bd4ebf8ae66d
change-id: 20250904-b4-pks-commit-graph-via-source-b4e1a1edd214


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-10-03 16:56 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 12:49 [PATCH 0/6] odb: track commit graphs via object source Patrick Steinhardt
2025-09-04 12:49 ` [PATCH 1/6] blame: drop explicit check for commit graph Patrick Steinhardt
2025-09-11 22:09   ` Taylor Blau
2025-09-04 12:49 ` [PATCH 2/6] revision: " Patrick Steinhardt
2025-09-11 22:16   ` Taylor Blau
2025-09-04 12:49 ` [PATCH 3/6] commit-graph: return the prepared commit graph from `prepare_commit_graph()` Patrick Steinhardt
2025-09-11 22:25   ` Taylor Blau
2025-09-04 12:49 ` [PATCH 4/6] commit-graph: return commit graph from `repo_find_commit_pos_in_graph()` Patrick Steinhardt
2025-09-11 22:54   ` Taylor Blau
2025-09-04 12:49 ` [PATCH 5/6] commit-graph: pass graphs that are to be merged as parameter Patrick Steinhardt
2025-09-04 12:50 ` [PATCH 6/6] odb: move commit-graph into the object sources Patrick Steinhardt
2025-09-11 23:00   ` Taylor Blau
2025-09-04 23:12 ` [PATCH 0/6] odb: track commit graphs via object source Junio C Hamano
2025-09-05 18:29   ` Derrick Stolee
2025-09-08 11:17     ` Patrick Steinhardt
2025-09-08 14:46       ` Derrick Stolee
2025-09-10 11:38         ` Patrick Steinhardt
2025-09-25 19:17           ` Junio C Hamano
2025-09-26  5:18             ` Patrick Steinhardt
2025-10-02 11:21             ` Patrick Steinhardt
2025-10-02 11:35               ` Patrick Steinhardt
2025-10-02 16:49               ` Junio C Hamano
2025-10-03 16:56                 ` Derrick Stolee
2025-09-11 23:08       ` Taylor Blau
2025-09-04 23:27 ` Junio C Hamano
2025-09-05  6:18   ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).