{"thread":{"id":"2938","subject":"cannot handle more than 29 refs","startedAt":"2005-12-27T14:43:07Z","lastAt":"2005-12-27T20:49:34Z","messageCount":5,"participants":["Jon Nelson","Junio C Hamano","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14065","messageId":"Pine.LNX.4.63.0512270840410.6812@gheavc.wnzcbav.cig","threadId":"2938","inReplyTo":null,"subject":"cannot handle more than 29 refs","fromName":"Jon Nelson","fromEmail":"jnelson-git@jamponi.net","sentAt":"2005-12-27T14:43:07Z","receivedAt":"2005-12-27T14:43:07Z","isPatch":false,"sender":{"key":"jnelson-git@jamponi.net","avatar":null},"body":"\nI get this message whenever I use --tags with git-pull with certain \nrepositories. The git repository is one, and so is my local repository. \nI googled and got nothing. I grepped the git archive and got only \nshow-branch.c.  Can this be safely ignored? Is it a known shortcoming, \nor something else entirely?\n\n--\nJon Nelson <jnelson-git@jamponi.net>\n"},{"id":"14067","messageId":"7vhd8ubi58.fsf@assigned-by-dhcp.cox.net","threadId":"2938","inReplyTo":"Pine.LNX.4.63.0512270840410.6812@gheavc.wnzcbav.cig","subject":"Re: cannot handle more than 29 refs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-27T16:48:35Z","receivedAt":"2005-12-27T16:48:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Known shortcoming.\n"},{"id":"14069","messageId":"Pine.LNX.4.64.0512271113290.14098@g5.osdl.org","threadId":"2938","inReplyTo":"Pine.LNX.4.63.0512270840410.6812@gheavc.wnzcbav.cig","subject":"Re: cannot handle more than 29 refs","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-12-27T19:18:58Z","receivedAt":"2005-12-27T19:18:58Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Dec 2005, Jon Nelson wrote:\n> \n> I get this message whenever I use --tags with git-pull with certain \n> repositories.\n\nYou shouldn't \"pull\" tags. You should just \"fetch\" them.\n\nThe error message comes from the fact that the pull is a \"fetch + merge\", \nand the merge logic tries to figure out what the common parent is with \n\"git-show-branch\". And the common parent finding is limited to 29 commits.\n\n(Which is a very reasonable limit: the normal case is 2, and doing an \noctopus-merge with more than four or five parents is already insane. Much \nless 30 parents).\n\n> The git repository is one, and so is my local repository. \n> I googled and got nothing. I grepped the git archive and got only \n> show-branch.c.  Can this be safely ignored? Is it a known shortcoming, \n> or something else entirely?\n\nWell, it's a known shortcoming, but it really ends up being a sign of you \ndoing the wrong thing and trying to merge all the tags together. The merge \nwould almost certainly fail, btw, regardless of anything else.\n\nJunio - I think we should make \"git pull\" refuse to merge more than one \nhead. If somebody wants to do an octopus merge, they can use \"git merge\" \ninstead. Hmm?\n\n\t\tLinus\n"},{"id":"14070","messageId":"7vvexa9vbu.fsf@assigned-by-dhcp.cox.net","threadId":"2938","inReplyTo":"Pine.LNX.4.64.0512271113290.14098@g5.osdl.org","subject":"Re: cannot handle more than 29 refs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-27T19:46:45Z","receivedAt":"2005-12-27T19:46:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> Junio - I think we should make \"git pull\" refuse to merge more than one \n> head. If somebody wants to do an octopus merge, they can use \"git merge\" \n> instead. Hmm?\n\nThat would lose the autogenerated merge message.  I can be\ntalked into making it 'core.expert = true' only, though.\n\nMore troubling is 'git pull --tags' should *not* even try to use\nthem for merging, so if it does that that needs to be fixed.\n\nAs I recall how I did (wanted to do) it, the default rule for\n'pull' is:\n\n - if you have explicit head names on the command line (--tags\n   does not count -- you are not stating name explicitly),\n   all of them are merged into an octopus;\n\n - otherwise if you used remotes/ shorthand the head(s) on the\n   first Pull: line;\n\n - otherwise HEAD;\n\nAnd the code _is_ broken.  Here is a proposed fix.\n\n-- >8 --\n[PATCH] Do not mark tags fetched via --tags flag as mergeable\n\nOtherwise \"git pull --tags\" would mistakenly try to merge all of\nthem, which is never what the user wants.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 767ca61..125bcea 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -192,7 +192,7 @@ then\n \t\tsed -e '\n \t\t\t/\\^/d\n \t\t\ts/^[^\t]*\t//\n-\t\t\ts/.*/&:&/')\n+\t\t\ts/.*/.&:&/')\n \tif test \"$#\" -gt 1\n \tthen\n \t\t# remote URL plus explicit refspecs; we need to merge them.\n"},{"id":"14071","messageId":"Pine.LNX.4.63.0512271448130.6812@gheavc.wnzcbav.cig","threadId":"2938","inReplyTo":"Pine.LNX.4.64.0512271113290.14098@g5.osdl.org","subject":"Re: cannot handle more than 29 refs","fromName":"Jon Nelson","fromEmail":"jnelson-git@jamponi.net","sentAt":"2005-12-27T20:49:34Z","receivedAt":"2005-12-27T20:49:34Z","isPatch":false,"sender":{"key":"jnelson-git@jamponi.net","avatar":null},"body":"On Tue, 27 Dec 2005, Linus Torvalds wrote:\n\n> \n> \n> On Tue, 27 Dec 2005, Jon Nelson wrote:\n> > \n> > I get this message whenever I use --tags with git-pull with certain \n> > repositories.\n> \n> You shouldn't \"pull\" tags. You should just \"fetch\" them.\n> \n> The error message comes from the fact that the pull is a \"fetch + merge\", \n> and the merge logic tries to figure out what the common parent is with \n> \"git-show-branch\". And the common parent finding is limited to 29 commits.\n> \n> (Which is a very reasonable limit: the normal case is 2, and doing an \n> octopus-merge with more than four or five parents is already insane. Much \n> less 30 parents).\n\n^^^ Aha! I think I understand what's going on here - and you are right, \nI *don't* want to merge from all of those tags, I just want the content, \nso fetch is what I should be doing.  Thanks!\n\n--\nJon Nelson <jnelson-git@jamponi.net>\n"}]}