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

Re: [PATCH 5/5] (BROKEN) get_merge_bases_many(): walk from many tips in parallel

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 28, 2012, 01:25 UTC
Message-ID
<7vipc3q041.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1346109123-12357-6-git-send-email-gitster@pobox.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
>  	for (i = 0; i < cnt; i++) {
> -		if (rslt[i])
> +		/*
> +		 * Is rslt[i] an ancestor of any of the others?
> +		 * then it is not interesting to us.
> +		 */
> +		for (j = 0; j < i; j++)
> +			others[j] = rslt[j];
> +		for (j = 1 + 1; j < cnt; j++)
s/1 + 1/i + 1/;
With that, all tests seem to pass ;-)
Show 18 quoted lines
> +			others[j - 1] = rslt[j];
> +		list = merge_bases_many(rslt[i], cnt - 1, others);
> +		clear_commit_marks(rslt[i], all_flags);
> +		for (j = 0; j < cnt - 1; j++)
> +			clear_commit_marks(others[j], all_flags);
> +		while (list) {
> +			if (rslt[i] == list->item)
> +				break;
> +			list = list->next;
> +		}
> +		if (!list)
>  			commit_list_insert_by_date(rslt[i], &result);
> +		free_commit_list(list);
>  	}
>  	free(rslt);
> +	free(others);
>  	return result;
>  }
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 27 in “optimize fast-forward checks”
  1. 0/5 optimize fast-forward checksJunio C Hamano, Aug 27, 2012
  2. 1/5 in_merge_bases(): support only one "other" commitJunio C Hamano, Aug 27, 2012
  3. 2/5 receive-pack: use in_merge_bases() for fast-forward checkJunio C Hamano, Aug 27, 2012
  4. 3/5 http-push: use in_merge_bases() for fast-forward checkJunio C Hamano, Aug 27, 2012
  5. 4/5 in_merge_bases(): omit unnecessary redundant common ancestor reductionJunio C Hamano, Aug 27, 2012
  6. 5/5 (BROKEN) get_merge_bases_many(): walk from many tips in parallelJunio C Hamano, Aug 27, 2012
  7. Junio C HamanoAug 28, 2012
  8. Junio C HamanoAug 28, 2012
  9. Junio C HamanoAug 28, 2012
  10. Jeff KingAug 29, 2012
  11. 1/2 basic priority queue implementationJeff King, Aug 29, 2012
  12. 2/2 commit: use a priority queue in merge base functionsJeff King, Aug 29, 2012
  13. Junio C HamanoAug 29, 2012
  14. Jeff KingAug 29, 2012
  15. Jeff KingAug 29, 2012
  16. Jeff KingAug 29, 2012
  17. Jeff KingAug 29, 2012
  18. Jeff KingAug 30, 2012
  19. Jeff KingAug 30, 2012
  20. Jeff KingAug 30, 2012
  21. Junio C HamanoAug 30, 2012
  22. Jeff KingAug 30, 2012
  23. Junio C HamanoAug 30, 2012
  24. Junio C HamanoAug 30, 2012
  25. Jeff KingAug 30, 2012
  26. Junio C HamanoAug 30, 2012
  27. Junio C HamanoAug 29, 2012

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.