Thread (42 messages) flat view 42 messages, 5 authors, 2021-09-01

Re: [PATCH v2 1/7] fetch: speed up lookup of want refs via commit-graph

From: Derrick Stolee <hidden>
Date: 2021-08-25 14:16:10

On 8/24/2021 6:36 AM, Patrick Steinhardt wrote:
Speed this up by opportunistcally trying to resolve object IDs via the
s/opportunistcally/opportunistically/ 
+			/*
+			 * References in "refs/tags/" are often going to point
+			 * to annotated tags, which are not part of the
+			 * commit-graph. We thus only try to look up refs in
+			 * the graph which are not in that namespace to not
+			 * regress performance in repositories with many
+			 * annotated tags.
+			 */
+			if (!starts_with(rm->name, "refs/tags/"))
+				commit = lookup_commit_in_graph(the_repository, &rm->old_oid);
This new logic looks good.
+			if (!commit) {
+				commit = lookup_commit_reference_gently(the_repository,
+									&rm->old_oid,
+									1);
+				if (!commit)
+					rm->fetch_head_status = FETCH_HEAD_NOT_FOR_MERGE;
+			}
Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help