{"thread":{"id":"9542","subject":"1.5.3-rc5 regression on OS X?","startedAt":"2007-08-15T21:19:47Z","lastAt":"2007-08-17T03:44:43Z","messageCount":11,"participants":["Perrin Meyer","Junio C Hamano","Brian Gernhardt","Randal L. Schwartz","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50820","messageId":"600399.61066.qm@web52807.mail.re2.yahoo.com","threadId":"9542","inReplyTo":null,"subject":"1.5.3-rc5 regression on OS X?","fromName":"Perrin Meyer","fromEmail":"perrinmeyer@yahoo.com","sentAt":"2007-08-15T21:19:47Z","receivedAt":"2007-08-15T21:19:47Z","isPatch":false,"sender":{"key":"perrinmeyer@yahoo.com","avatar":null},"body":"\nHi,\n\nWhen I try to build and test 1.5.3-rc5 on my OS X box, I get a failure on \"make test\"\n\n*   ok 82: 15 (fail) - must match A in O && A && B && O==A && O==B case\n* FAIL 83: 16 - A matches in one and B matches in another.\n        rm -f .git/index F16 &&\n            echo F16 >F16 &&\n            git update-index --add F16 &&\n            tree0=`git write-tree` &&\n            echo E16 >F16 &&\n            git update-index F16 &&\n            tree1=`git write-tree` &&\n            git read-tree -m $tree0 $tree1 $tree1 $tree0 &&\n            git ls-files --stage\n* failed 1 among 83 test(s)\nmake[1]: *** [t1000-read-tree-m-3way.sh] Error 1\nmake: *** [test] Error 2\n\n\nI was able to build and test git 1.5.2.4 fine, with no errors in the test suite. \n\nI also just build 1.5.3-rc5 on a redhat box, with no errors in the testsuite. \n\nMy OS X box is a quad G5 running OS X 10.4.10, with gcc version: \n\nperrin-meyers-power-mac-g5:~/GIT/git perrin$ gcc -v\nUsing built-in specs.\nTarget: powerpc-apple-darwin8\nConfigured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8\nThread model: posix\ngcc version 4.0.0 (Apple Computer, Inc. build 5026)\n\nI define \"NO_EXPAT\" when I build on OS X. \n\nAm I doing something wrong?\n\nThanks,\n\nPerrin\n"},{"id":"50822","messageId":"7vwsvwo54f.fsf@gitster.siamese.dyndns.org","threadId":"9542","inReplyTo":"600399.61066.qm@web52807.mail.re2.yahoo.com","subject":"Re: 1.5.3-rc5 regression on OS X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-15T21:33:04Z","receivedAt":"2007-08-15T21:33:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Perrin Meyer <perrinmeyer@yahoo.com> writes:\n\n> I was able to build and test git 1.5.2.4 fine, with no errors in the test suite. \n>\n> I also just build 1.5.3-rc5 on a redhat box, with no errors in the testsuite. \nThe above sounds as if you built 1.5.2.4 on your Mac in not so\nrecent past, and 1.5.3-rc5 on your Mac and RH recently.\n\nHas anything changed on your Mac between the time you built\n1.5.2.4 and failed to pass the test for 1.5.3-rc5?\n"},{"id":"50825","messageId":"6081AC6E-4F76-4865-82FB-5F620ECB446F@silverinsanity.com","threadId":"9542","inReplyTo":"600399.61066.qm@web52807.mail.re2.yahoo.com","subject":"Re: 1.5.3-rc5 regression on OS X?","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-08-15T21:43:09Z","receivedAt":"2007-08-15T21:43:09Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Aug 15, 2007, at 5:19 PM, Perrin Meyer wrote:\n\n> My OS X box is a quad G5 running OS X 10.4.10, with gcc version:\n>\n> perrin-meyers-power-mac-g5:~/GIT/git perrin$ gcc -v\n> Using built-in specs.\n> Target: powerpc-apple-darwin8\n> Configured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure  \n> --disable-checking --prefix=/usr --mandir=/share/man --enable- \n> languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]* \n> $/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ -- \n> build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- \n> target=powerpc-apple-darwin8\n> Thread model: posix\n> gcc version 4.0.0 (Apple Computer, Inc. build 5026)\n>\n> I define \"NO_EXPAT\" when I build on OS X.\n>\n> Am I doing something wrong?\n\nI believe you have an old version of the Developer Tools.  I have no  \nissues with that test on my MacBook Pro (2.16 GHz Intel Core Duo).\n\n$ gcc -v\nUsing built-in specs.\nTarget: i686-apple-darwin8\nConfigured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure -- \ndisable-checking -enable-werror --prefix=/usr --mandir=/share/man -- \nenable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] \n[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with- \nslibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona -- \nwith-tune=generic --program-prefix= --host=i686-apple-darwin8 -- \ntarget=i686-apple-darwin8\nThread model: posix\ngcc version 4.0.1 (Apple Computer, Inc. build 5367)\n\nI don't use NO_EXPAT, but that shouldn't affect read-tree at all.\n\n~~ Brian\n"},{"id":"50830","messageId":"86k5rwcuol.fsf@blue.stonehenge.com","threadId":"9542","inReplyTo":"600399.61066.qm@web52807.mail.re2.yahoo.com","subject":"Re: 1.5.3-rc5 regression on OS X?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2007-08-15T22:14:02Z","receivedAt":"2007-08-15T22:14:02Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Perrin\" == Perrin Meyer <perrinmeyer@yahoo.com> writes:\n\nPerrin> Hi,\n\nPerrin> When I try to build and test 1.5.3-rc5 on my OS X box, I get a failure on \"make test\"\n\nMy t1000 test succeeded on modern OSX.  But \"t1301-shared-repo\" failed:\n\n*** t1301-shared-repo.sh ***\n* FAIL 1: shared=all\n\n                mkdir sub &&\n                cd sub &&\n                git init --shared=all &&\n                test 2 = $(git config core.sharedrepository)\n\n* FAIL 2: update-server-info honors core.sharedRepository\n\n                : > a1 &&\n                git add a1 &&\n                test_tick &&\n                git commit -m a1 &&\n                umask 0277 &&\n                git update-server-info &&\n                test 444 = $(stat -c %a .git/info/refs)\n\n* failed 2 among 2 test(s)\nmake[1]: *** [t1301-shared-repo.sh] Error 1\n\nThis is on 1467b5fec376b6c43a5fa54bffd356e458a8d57c.\n\nOh... I notice \"stat -c\" there.  My stat doesn't know -c:\n\n    localhost.local:~/MIRROR/git-GIT % stat -c %a /\n    stat: illegal option -- c\n    usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]\n\nGotta stop using those non-portable options, I guess. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"50833","messageId":"7vfy2ko1w6.fsf@gitster.siamese.dyndns.org","threadId":"9542","inReplyTo":"600399.61066.qm@web52807.mail.re2.yahoo.com","subject":"Re: 1.5.3-rc5 regression on OS X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-15T22:42:49Z","receivedAt":"2007-08-15T22:42:49Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Does this help?\n\n---\n builtin-read-tree.c |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex 1967d10..5b07e9a 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -96,7 +96,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n {\n \tint i, newfd, stage = 0;\n \tunsigned char sha1[20];\n-\tstruct tree_desc t[3];\n+\tstruct tree_desc t[20];\n \tstruct unpack_trees_options opts;\n \n \tmemset(&opts, 0, sizeof(opts));\n@@ -263,6 +263,9 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n \t\t\topts.head_idx = 1;\n \t}\n \n+\tif (ARRAY_SIZE(t) < nr_trees)\n+\t\tdie(\"I cannot read more than %d trees\", ARRAY_SIZE(t));\n+\n \tfor (i = 0; i < nr_trees; i++) {\n \t\tstruct tree *tree = trees[i];\n \t\tparse_tree(tree);\n"},{"id":"50834","messageId":"7vbqd8o1qs.fsf@gitster.siamese.dyndns.org","threadId":"9542","inReplyTo":"600399.61066.qm@web52807.mail.re2.yahoo.com","subject":"[PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-15T22:46:03Z","receivedAt":"2007-08-15T22:46:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"For multi-base merges, we allowed read-tree -m to take more than\nthree trees (the last two are our and their branches, and all the\nearlier ones, typically one but potentially more, are used as the\nmerge base).  Unfortunately, the conversion done by commit 933bf40\nbroke this.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-read-tree.c |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex 1967d10..5b07e9a 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -96,7 +96,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n {\n \tint i, newfd, stage = 0;\n \tunsigned char sha1[20];\n-\tstruct tree_desc t[3];\n+\tstruct tree_desc t[20];\n \tstruct unpack_trees_options opts;\n \n \tmemset(&opts, 0, sizeof(opts));\n@@ -263,6 +263,9 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n \t\t\topts.head_idx = 1;\n \t}\n \n+\tif (ARRAY_SIZE(t) < nr_trees)\n+\t\tdie(\"I cannot read more than %d trees\", ARRAY_SIZE(t));\n+\n \tfor (i = 0; i < nr_trees; i++) {\n \t\tstruct tree *tree = trees[i];\n \t\tparse_tree(tree);\n-- \n1.5.3.rc5\n"},{"id":"50906","messageId":"alpine.LFD.0.999.0708161750550.30176@woody.linux-foundation.org","threadId":"9542","inReplyTo":"7vbqd8o1qs.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-08-17T00:59:18Z","receivedAt":"2007-08-17T00:59:18Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 15 Aug 2007, Junio C Hamano wrote:\n>\n> For multi-base merges, we allowed read-tree -m to take more than\n> three trees (the last two are our and their branches, and all the\n> earlier ones, typically one but potentially more, are used as the\n> merge base).  Unfortunately, the conversion done by commit 933bf40\n> broke this.\n\nSorry. I didn't even realize people did this. Oops.\n\nI note that the thign you committed limited the number of trees to 4. \nMay I suggest this patch in addition to your patch? Also, is 4 actually \nthe real maximum? Maybe it should be raised?\n\nWhat *is* the behaviour for four trees? Reading \"unpack_trees()\" source \nimplies that all other trees go into stage 1, where the first matching \nentry is used?\n\n\t\tLinus\n\n---\n builtin-read-tree.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex f6764b9..d5f849b 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -21,7 +21,7 @@ static int list_tree(unsigned char *sha1)\n {\n \tstruct tree *tree;\n \n-\tif (nr_trees >= 4)\n+\tif (nr_trees >= MAX_TREES)\n \t\treturn -1;\n \ttree = parse_tree_indirect(sha1);\n \tif (!tree)\n"},{"id":"50910","messageId":"7vbqd6j4a0.fsf@gitster.siamese.dyndns.org","threadId":"9542","inReplyTo":"alpine.LFD.0.999.0708161750550.30176@woody.linux-foundation.org","subject":"Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-17T02:14:47Z","receivedAt":"2007-08-17T02:14:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> Sorry. I didn't even realize people did this. Oops.\n\nThis is no big deal.  It would have triggered if you are using\nresolve strategy _and_ did a multi merge-base merge, the former\nof which is quite unusual these days.\n\n> What *is* the behaviour for four trees? Reading \"unpack_trees()\" source \n> implies that all other trees go into stage 1, where the first matching \n> entry is used?\n\nDocumentation/technical/trivial-merge.txt describes this under\nthree-way case.  Essentially this was an attempt to extend the\noriginal merge-resolve so that it would catch problematic\ncriss-cross cases (case #16 in the description).\n"},{"id":"50913","messageId":"alpine.LFD.0.999.0708161930100.30176@woody.linux-foundation.org","threadId":"9542","inReplyTo":"7vbqd6j4a0.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-08-17T02:32:34Z","receivedAt":"2007-08-17T02:32:34Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 16 Aug 2007, Junio C Hamano wrote:\n>\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n> > \n> > Sorry. I didn't even realize people did this. Oops.\n> \n> This is no big deal.  It would have triggered if you are using\n> resolve strategy _and_ did a multi merge-base merge, the former\n> of which is quite unusual these days.\n\nYeah, ok. I see what's up. \n\nAnyway, it sounds like we should just increase MAX_TREES to get the old \nbehaviour (and that requires applying my trivial one-liner patch too, \notherwise \"git read-tree\" will refuse to do more than 4 trees anyway).\n\nEven if nothing apparently actually does it.\n\nThe alternative, I think, would be to just say that the three-way merge is \nreally just three ways, and remove the test that tests four different \ntrees. That would allow simplifying the logic in unpack_trees(). But since \nthe logic already exists, there's no real upside.\n\n\t\tLinus\n"},{"id":"50914","messageId":"7v7inuj0eh.fsf@gitster.siamese.dyndns.org","threadId":"9542","inReplyTo":"alpine.LFD.0.999.0708161930100.30176@woody.linux-foundation.org","subject":"Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-17T03:38:30Z","receivedAt":"2007-08-17T03:38:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Thu, 16 Aug 2007, Junio C Hamano wrote:\n>>\n>> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>> > \n>> > Sorry. I didn't even realize people did this. Oops.\n>> \n>> This is no big deal.  It would have triggered if you are using\n>> resolve strategy _and_ did a multi merge-base merge, the former\n>> of which is quite unusual these days.\n>\n> Yeah, ok. I see what's up. \n\nSo no worries.  It was triggered by an error in t1000 test.\n\n-- >8 --\n[PATCH] Clean-up read-tree error condition.\n\nThis is a follow-up to f34f2b0b; list_tree() function is where it\nfirst notices that the command line fed too many trees for us to\nhandle, so move the error exit message to there, and raise the\nMAX_TREES to 8 (not that it matters very much in practice).\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-read-tree.c |    9 +++------\n 1 files changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex f6764b9..43cd56a 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -13,7 +13,7 @@\n #include \"dir.h\"\n #include \"builtin.h\"\n \n-#define MAX_TREES 4\n+#define MAX_TREES 8\n static int nr_trees;\n static struct tree *trees[MAX_TREES];\n \n@@ -21,8 +21,8 @@ static int list_tree(unsigned char *sha1)\n {\n \tstruct tree *tree;\n \n-\tif (nr_trees >= 4)\n-\t\treturn -1;\n+\tif (nr_trees >= MAX_TREES)\n+\t\tdie(\"I cannot read more than %d trees\", MAX_TREES);\n \ttree = parse_tree_indirect(sha1);\n \tif (!tree)\n \t\treturn -1;\n@@ -264,9 +264,6 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n \t\t\topts.head_idx = 1;\n \t}\n \n-\tif (MAX_TREES < nr_trees)\n-\t\tdie(\"I cannot read more than %d trees\", MAX_TREES);\n-\n \tfor (i = 0; i < nr_trees; i++) {\n \t\tstruct tree *tree = trees[i];\n \t\tparse_tree(tree);\n-- \n1.5.3.rc5\n"},{"id":"50915","messageId":"alpine.LFD.0.999.0708162044280.30176@woody.linux-foundation.org","threadId":"9542","inReplyTo":"7v7inuj0eh.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Fix read-tree merging more than 3 trees using 3-way merge","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-08-17T03:44:43Z","receivedAt":"2007-08-17T03:44:43Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 16 Aug 2007, Junio C Hamano wrote:\n>\n> [PATCH] Clean-up read-tree error condition.\n> \n> This is a follow-up to f34f2b0b; list_tree() function is where it\n> first notices that the command line fed too many trees for us to\n> handle, so move the error exit message to there, and raise the\n> MAX_TREES to 8 (not that it matters very much in practice).\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nACK. Obviously.\n\n\t\tLinus\n"}]}