From: Stefan Sperling Subject: Re: [patch] simplify ancestry checks To: James Cook Cc: gameoftrees@openbsd.org Date: Thu, 25 May 2023 09:17:21 +0200 On Wed, May 24, 2023 at 10:28:24PM +0000, James Cook wrote: > On Wed, May 24, 2023 at 05:58:20PM +0200, Stefan Sperling wrote: > > And should it not say "if there is none" rather than "if there are none"? > > I cannot think of a case where multiple YCA commits would exist. Unless > > perhaps if merge-commits were excluded from the set of possible YCAs which > > would leave their parent commits as a set of YCAs... ? > > Maybe I am missing something? > > I meant "if there are no commits that can be reached from both commit_id > and commit_id2". > > How about... > > /* > * Sets *yca_id to the youngest common ancestor of commit_id and > * commit_id2. Returns got_error(GOT_ERR_ANCESTRY) if they have no > * common ancestors. > * > * If first_parent_traversal is nonzero, only linear history is considered. > */ Thanks, this makes sense to me. I have committed your diff with this new comment text swapped in.