Git development
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Len Brown <lenb@kernel.org>, git@vger.kernel.org
Subject: Re: [PATCH] commit-tree: lift completely arbitrary limit of 16 parents
Date: Fri, 27 Jun 2008 18:46:43 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.1.00.0806271845450.9925@racer> (raw)
In-Reply-To: <7v7icassr8.fsf@gitster.siamese.dyndns.org>

Hi,

On Fri, 27 Jun 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > -static int new_parent(int idx)
> > +static void new_parent(struct commit *parent, struct commit_list **parents_p)
> >  {
> > -	int i;
> > -	unsigned char *sha1 = parent_sha1[idx];
> > -	for (i = 0; i < idx; i++) {
> > -		if (!hashcmp(parent_sha1[i], sha1)) {
> > +	unsigned char *sha1 = parent->object.sha1;
> > +	struct commit_list *parents;
> > +	for (parents = *parents_p; parents; parents = parents->next) {
> > +		if (!hashcmp(parents->item->object.sha1, sha1)) {
> 
> Wouldn't it be enough to compare (parents->item == parent)?

Probably, since we now use lookup_commit().  Feel free to change.

> > @@ -69,18 +63,16 @@ int cmd_commit_tree(int argc, const char **argv, 
> > const char *prefix)
> >  
> >  	check_valid(tree_sha1, OBJ_TREE);
> >  	for (i = 2; i < argc; i += 2) {
> > +		unsigned char sha1[40];
> 
> s/4/2/;

Yes, I admitted that already in response to Hannes.

Mea culpa, mea maxima culpa.

Sorry,
Dscho

      reply	other threads:[~2008-06-27 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  2:44 octopus limit Len Brown
2008-06-27  6:33 ` Matthieu Moy
2008-06-27 13:04   ` Miklos Vajna
2008-06-27 12:00 ` Johannes Schindelin
2008-06-27 12:24   ` [PATCH] commit-tree: lift completely arbitrary limit of 16 parents Johannes Schindelin
2008-06-27 13:00     ` Johannes Sixt
2008-06-27 13:02       ` Johannes Schindelin
2008-06-27 17:16     ` Junio C Hamano
2008-06-27 17:46       ` Johannes Schindelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0806271845450.9925@racer \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lenb@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox