From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Perrin Meyer <perrinmeyer@yahoo.com>, git@vger.kernel.org
Subject: Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge
Date: Thu, 16 Aug 2007 20:38:30 -0700 [thread overview]
Message-ID: <7v7inuj0eh.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0708161930100.30176@woody.linux-foundation.org> (Linus Torvalds's message of "Thu, 16 Aug 2007 19:32:34 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Thu, 16 Aug 2007, Junio C Hamano wrote:
>>
>> Linus Torvalds <torvalds@linux-foundation.org> writes:
>> >
>> > Sorry. I didn't even realize people did this. Oops.
>>
>> This is no big deal. It would have triggered if you are using
>> resolve strategy _and_ did a multi merge-base merge, the former
>> of which is quite unusual these days.
>
> Yeah, ok. I see what's up.
So no worries. It was triggered by an error in t1000 test.
-- >8 --
[PATCH] Clean-up read-tree error condition.
This is a follow-up to f34f2b0b; list_tree() function is where it
first notices that the command line fed too many trees for us to
handle, so move the error exit message to there, and raise the
MAX_TREES to 8 (not that it matters very much in practice).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin-read-tree.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index f6764b9..43cd56a 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -13,7 +13,7 @@
#include "dir.h"
#include "builtin.h"
-#define MAX_TREES 4
+#define MAX_TREES 8
static int nr_trees;
static struct tree *trees[MAX_TREES];
@@ -21,8 +21,8 @@ static int list_tree(unsigned char *sha1)
{
struct tree *tree;
- if (nr_trees >= 4)
- return -1;
+ if (nr_trees >= MAX_TREES)
+ die("I cannot read more than %d trees", MAX_TREES);
tree = parse_tree_indirect(sha1);
if (!tree)
return -1;
@@ -264,9 +264,6 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
opts.head_idx = 1;
}
- if (MAX_TREES < nr_trees)
- die("I cannot read more than %d trees", MAX_TREES);
-
for (i = 0; i < nr_trees; i++) {
struct tree *tree = trees[i];
parse_tree(tree);
--
1.5.3.rc5
next prev parent reply other threads:[~2007-08-17 3:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 21:19 1.5.3-rc5 regression on OS X? Perrin Meyer
2007-08-15 21:33 ` Junio C Hamano
2007-08-15 21:43 ` Brian Gernhardt
2007-08-15 22:14 ` Randal L. Schwartz
2007-08-15 22:42 ` Junio C Hamano
2007-08-15 22:46 ` [PATCH] Fix read-tree merging more than 3 trees using 3-way merge Junio C Hamano
2007-08-17 0:59 ` Linus Torvalds
2007-08-17 2:14 ` Junio C Hamano
2007-08-17 2:32 ` Linus Torvalds
2007-08-17 3:38 ` Junio C Hamano [this message]
2007-08-17 3:44 ` Linus Torvalds
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=7v7inuj0eh.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=perrinmeyer@yahoo.com \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.