Miklos Vajna <vmiklos@xxxxxxxxxxxxxx> writes: > On Thu, Jun 05, 2008 at 04:16:46PM -0700, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> Do you have a caller of this function that keeps a pointer to commit_list >> that needs to be appended at the tail or inserted at the beginning >> depending on the phase of the moon, or does the caller always append to >> that list? > > The later. I use it for appending a new parent for the merge commit and > after parsing a new remote head. In both cases I always append a list. If that is the case, you might want to check how parse_commit_buffer() in commit.c builds "parents" list. It is a standard pattern to append to the list using commit_list_insert() and that is the reason why it returns a pointer. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html