From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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 10:16:27 -0700 [thread overview]
Message-ID: <7v7icassr8.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0806271324010.9925@racer> (Johannes Schindelin's message of "Fri, 27 Jun 2008 13:24:47 +0100 (BST)")
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)?
> @@ -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/;
next prev parent reply other threads:[~2008-06-27 17:17 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 [this message]
2008-06-27 17:46 ` Johannes Schindelin
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=7v7icassr8.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--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