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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux