{"thread":{"id":"22789","subject":"git-push segfault","startedAt":"2010-02-24T03:46:37Z","lastAt":"2010-02-24T10:49:11Z","messageCount":6,"participants":["Dale Rowley","Jeff King","Andreas Krey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135522","messageId":"loom.20100224T043557-954@post.gmane.org","threadId":"22789","inReplyTo":null,"subject":"git-push segfault","fromName":"Dale Rowley","fromEmail":"ddrowley3@juno.com","sentAt":"2010-02-24T03:46:37Z","receivedAt":"2010-02-24T03:46:37Z","isPatch":false,"sender":{"key":"ddrowley3@juno.com","avatar":null},"body":"Steps to reproduce:\n\ngit clone /path/to/some/repo\ncd repo\ngit config --unset branch.master.remote\ngit push\n(seg fault)\n\nI'm using version 1.7.0.\n\nDale\n"},{"id":"135526","messageId":"loom.20100224T062506-877@post.gmane.org","threadId":"22789","inReplyTo":"loom.20100224T043557-954@post.gmane.org","subject":"Re: git-push segfault","fromName":"Dale Rowley","fromEmail":"ddrowley3@juno.com","sentAt":"2010-02-24T06:02:59Z","receivedAt":"2010-02-24T06:02:59Z","isPatch":false,"sender":{"key":"ddrowley3@juno.com","avatar":null},"body":"Dale Rowley <ddrowley3 <at> juno.com> writes:\n\n> git config --unset branch.master.remote\n> git push\n\nYes, those 2 commands don't make much sense. I should have mentioned that this\nwas just the simplest way to reproduce the problem. My original and more\nrealistic scenario:\n\ngit clone /path/to/some/repo\ncd repo\ngit remote add remote1 <url>\ngit remote add remote2 <url>\ngit config --unset branch.master.remote\ngit push remote1\n(seg fault)\n\nThe reason for unsetting branch.master.remote was to force git to complain and\nabort if I accidentally typed 'git push' instead of 'git push <remote>' (I\nwanted to avoid accidentally pushing to the wrong remote repo).\n\nDale\n"},{"id":"135530","messageId":"20100224063606.GB12796@coredump.intra.peff.net","threadId":"22789","inReplyTo":"loom.20100224T043557-954@post.gmane.org","subject":"Re: git-push segfault","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-24T06:36:06Z","receivedAt":"2010-02-24T06:36:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 24, 2010 at 03:46:37AM +0000, Dale Rowley wrote:\n\n> Steps to reproduce:\n> \n> git clone /path/to/some/repo\n> cd repo\n> git config --unset branch.master.remote\n> git push\n> (seg fault)\n> \n> I'm using version 1.7.0.\n\nI can't reproduce here, using the following script:\n\n-- >8 --\n#!/bin/sh\n\nrm -rf parent child\n\nmkdir parent && (\n  cd parent &&\n  git init\n) &&\ngit clone parent child &&\ncd child &&\ngit config --unset branch.master.remote &&\ngit push\n-- 8< --\n\nDoes that trigger the problem for you? If not, can you show what is\ndifferent between your earlier reproduction recipe and this one?\n\n-Peff\n"},{"id":"135545","messageId":"20100224082214.GA31559@inner.home.ulmdo.de","threadId":"22789","inReplyTo":"20100224063606.GB12796@coredump.intra.peff.net","subject":"Re: git-push segfault","fromName":"Andreas Krey","fromEmail":"a.krey@gmx.de","sentAt":"2010-02-24T08:22:14Z","receivedAt":"2010-02-24T08:22:14Z","isPatch":false,"sender":{"key":"a.krey@gmx.de","avatar":"https://avatars.githubusercontent.com/u/37810?v=4"},"body":"On Wed, 24 Feb 2010 01:36:06 +0000, Jeff King wrote:\n...\n> #!/bin/sh\n...\n> git clone parent child &&\n> cd child &&\n\nHow about 'set -xe' instead of all the &&?\n\nAndreas\n"},{"id":"135548","messageId":"20100224092356.GA28959@coredump.intra.peff.net","threadId":"22789","inReplyTo":"20100224082214.GA31559@inner.home.ulmdo.de","subject":"Re: git-push segfault","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-24T09:23:57Z","receivedAt":"2010-02-24T09:23:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 24, 2010 at 09:22:14AM +0100, Andreas Krey wrote:\n\n> On Wed, 24 Feb 2010 01:36:06 +0000, Jeff King wrote:\n> ...\n> > #!/bin/sh\n> ...\n> > git clone parent child &&\n> > cd child &&\n> \n> How about 'set -xe' instead of all the &&?\n\nI long ago stopped trying to remember all of the places where \"-e\" works\nand where it doesn't, and just use explicit \"&&\" (or \"|| exit 1\"). For\nexample, the subshell in my recipe needs an explicit error check under\ndash, but will exit correctly using bash. I seem to recall there are\nsome other gotchas, but it has been a long time since I looked.\n\nAt any rate, this is not even code for inclusion in git. It is \"please\ncut and paste this and tell me if it breaks\". So I am not too worried\nabout style.\n\n-Peff\n"},{"id":"135551","messageId":"20100224104911.GA24765@inner.home.ulmdo.de","threadId":"22789","inReplyTo":"20100224092356.GA28959@coredump.intra.peff.net","subject":"Re: git-push segfault","fromName":"Andreas Krey","fromEmail":"a.krey@gmx.de","sentAt":"2010-02-24T10:49:11Z","receivedAt":"2010-02-24T10:49:11Z","isPatch":false,"sender":{"key":"a.krey@gmx.de","avatar":"https://avatars.githubusercontent.com/u/37810?v=4"},"body":"On Wed, 24 Feb 2010 04:23:57 +0000, Jeff King wrote:\n> On Wed, Feb 24, 2010 at 09:22:14AM +0100, Andreas Krey wrote:\n...\n> > How about 'set -xe' instead of all the &&?\n...\n> At any rate, this is not even code for inclusion in git.\n\nThat was why I was asking. In throwaway scripts -e as well as -x is\nrather practical (esp. the latter); I wouldn't use that in 'real'\nscripts. Probably it's better not to set a bad example in posted\nthrowaway scripts, though. :-)\n\nAndreas\n"}]}