{"thread":{"id":"13525","subject":"git clone broken in next","startedAt":"2008-05-15T03:54:39Z","lastAt":"2008-05-15T19:53:45Z","messageCount":7,"participants":["Kevin Ballard","Jeff King","Johannes Schindelin","Daniel Barkalow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77014","messageId":"BB5BF79E-ECAE-4F63-AFF1-8C13F23D3D10@sb.org","threadId":"13525","inReplyTo":null,"subject":"git clone broken in next","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-05-15T03:54:39Z","receivedAt":"2008-05-15T03:54:39Z","isPatch":false,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"Something's horribly wrong in next. I just installed the latest from  \nnext and then ran\n\n   git clone git://github.com/kballard/github-gem.git\n\nThe resulting repo had absolutely nothing in the workdir. `git status`  \nclaims every single file is deleted but not updated. `git checkout -f  \nHEAD` fixed the workdir.\n\nThis is 100% repeatable with different repositories.\n\n$ git --version\ngit version 1.5.5.1.373.gce4aa\n\n(this is the tip of next plus a single documentation patch).\n\nOddly, all of the tests with \"clone\" in their name seem to be passing  \njust fine.\n\nOk, after running a git-bisect, I narrowed it down to  \n8434c2f1afedb936e0ea8c07ce25733013c2f743 (Build in clone).\n\nMy system is Mac OS X 10.5.2.\n\n-- \nKevin Ballard\nhttp://kevin.sb.org\nkevin@sb.org\nhttp://www.tildesoft.com\n"},{"id":"77020","messageId":"20080515044402.GA3517@sigill.intra.peff.net","threadId":"13525","inReplyTo":"BB5BF79E-ECAE-4F63-AFF1-8C13F23D3D10@sb.org","subject":"Re: git clone broken in next","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-05-15T04:44:02Z","receivedAt":"2008-05-15T04:44:02Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 14, 2008 at 11:54:39PM -0400, Kevin Ballard wrote:\n\n> Something's horribly wrong in next. I just installed the latest from next \n> and then ran\n>\n>   git clone git://github.com/kballard/github-gem.git\n>\n> The resulting repo had absolutely nothing in the workdir. `git status`  \n> claims every single file is deleted but not updated. `git checkout -f  \n> HEAD` fixed the workdir.\n\nHmm, builtin-clone does seem to be completely broken. It looks like\nunpack_trees is not doing its job for some reason, but I haven't looked\nfurther. But it surprised me that we aren't testing anything as simple\nas \"clone works\". The test below currently fails (though I am getting\nother test failures which are presumably related).\n\n---\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex dc9d63d..593d1a3 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -23,4 +23,11 @@ test_expect_success 'clone with excess parameters' '\n \n '\n \n+test_expect_success 'clone checks out files' '\n+\n+\tgit clone src dst &&\n+\ttest -f dst/file\n+\n+'\n+\n test_done\n"},{"id":"77021","messageId":"20080515045026.GA26161@sigill.intra.peff.net","threadId":"13525","inReplyTo":"20080515044402.GA3517@sigill.intra.peff.net","subject":"Re: git clone broken in next","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-05-15T04:50:26Z","receivedAt":"2008-05-15T04:50:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 15, 2008 at 12:44:02AM -0400, Jeff King wrote:\n\n> Hmm, builtin-clone does seem to be completely broken. It looks like\n> unpack_trees is not doing its job for some reason, but I haven't looked\n> further. But it surprised me that we aren't testing anything as simple\n> as \"clone works\". The test below currently fails (though I am getting\n> other test failures which are presumably related).\n> \n> ---\n> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\n> index dc9d63d..593d1a3 100755\n> --- a/t/t5601-clone.sh\n> +++ b/t/t5601-clone.sh\n> @@ -23,4 +23,11 @@ test_expect_success 'clone with excess parameters' '\n>  \n>  '\n>  \n> +test_expect_success 'clone checks out files' '\n> +\n> +\tgit clone src dst &&\n> +\ttest -f dst/file\n> +\n> +'\n> +\n>  test_done\n\nJust to be sure, I bisected this test, and sure enough, the problem\ncommit is 8434c2f1 (build in clone). Daniel?\n\n-Peff\n"},{"id":"77037","messageId":"alpine.DEB.1.00.0805151042570.30431@racer","threadId":"13525","inReplyTo":"20080515045026.GA26161@sigill.intra.peff.net","subject":"[PATCH] builtin-clone: fix initial checkout","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-15T09:48:25Z","receivedAt":"2008-05-15T09:48:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSomewhere in the process of finishing up builtin-clone, the update of\nthe working tree was lost.  This was due to not using the option \"merge\"\nfor unpack_trees().\n\nBreakage noticed by Kevin Ballard.\n\nTest by Jeff King.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\t> On Thu, May 15, 2008 at 12:44:02AM -0400, Jeff King wrote:\n\t> \n\t> > Hmm, builtin-clone does seem to be completely broken. It looks \n\t> > like unpack_trees is not doing its job for some reason, but I\n\t> > haven't looked further. But it surprised me that we aren't \n\t> > testing anything as simple as \"clone works\". The test below\n\t> > currently fails (though I am getting other test failures which \n\t> > are presumably related).\n\n\tI did not notice the breakage earlier, because I ran with a \n\t\"twoway_merge\" version of builtin-clone in my personal tree.\n\n builtin-clone.c  |    3 +++\n t/t5601-clone.sh |    7 +++++++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-clone.c b/builtin-clone.c\nindex a7c075d..8713128 100644\n--- a/builtin-clone.c\n+++ b/builtin-clone.c\n@@ -525,7 +525,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \n \t\tmemset(&opts, 0, sizeof opts);\n \t\topts.update = 1;\n+\t\topts.merge = 1;\n+\t\topts.fn = oneway_merge;\n \t\topts.verbose_update = !option_quiet;\n+\t\topts.src_index = &the_index;\n \t\topts.dst_index = &the_index;\n \n \t\ttree = parse_tree_indirect(remote_head->old_sha1);\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex dc9d63d..593d1a3 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -23,4 +23,11 @@ test_expect_success 'clone with excess parameters' '\n \n '\n \n+test_expect_success 'clone checks out files' '\n+\n+\tgit clone src dst &&\n+\ttest -f dst/file\n+\n+'\n+\n test_done\n-- \n1.5.5.1.424.g3256b\n"},{"id":"77040","messageId":"20080515105403.GA10592@sigill.intra.peff.net","threadId":"13525","inReplyTo":"alpine.DEB.1.00.0805151042570.30431@racer","subject":"Re: [PATCH] builtin-clone: fix initial checkout","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-05-15T10:54:04Z","receivedAt":"2008-05-15T10:54:04Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 15, 2008 at 10:48:25AM +0100, Johannes Schindelin wrote:\n\n> Somewhere in the process of finishing up builtin-clone, the update of\n> the working tree was lost.  This was due to not using the option \"merge\"\n> for unpack_trees().\n\nLooking at how \"git-checkout\" does it made me think that might be\nrelated, but for some reason I didn't try the obvious.\n\nThanks.\n\nTested-by: Jeff King <peff@peff.net>\n\n-Peff\n"},{"id":"77049","messageId":"alpine.LNX.1.00.0805151050240.19665@iabervon.org","threadId":"13525","inReplyTo":"alpine.DEB.1.00.0805151042570.30431@racer","subject":"Re: [PATCH] builtin-clone: fix initial checkout","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-05-15T15:17:34Z","receivedAt":"2008-05-15T15:17:34Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Thu, 15 May 2008, Johannes Schindelin wrote:\n\n> Somewhere in the process of finishing up builtin-clone, the update of\n> the working tree was lost.  This was due to not using the option \"merge\"\n> for unpack_trees().\n\nI was sure I'd added support for update without merge, but now I can't see \nwhat became of it. I was pretty sure I'd actually needed it for something, \ntoo, but I guess that got resolved some other way. I'll have to check \ntonight on my laptop for something of the sort in my reflogs.\n\nI'm pretty sure that just including merge and the necessary other options \nhere will work fine (since there's no index to merge into) and I don't \nhave a simple fix off the top of my head for that flag combination, so:\n\nAcked-by: Daniel Barkalow <barkalow@iabervon.org>\n\n> Breakage noticed by Kevin Ballard.\n> \n> Test by Jeff King.\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> \n> \t> On Thu, May 15, 2008 at 12:44:02AM -0400, Jeff King wrote:\n> \t> \n> \t> > Hmm, builtin-clone does seem to be completely broken. It looks \n> \t> > like unpack_trees is not doing its job for some reason, but I\n> \t> > haven't looked further. But it surprised me that we aren't \n> \t> > testing anything as simple as \"clone works\". The test below\n> \t> > currently fails (though I am getting other test failures which \n> \t> > are presumably related).\n> \n> \tI did not notice the breakage earlier, because I ran with a \n> \t\"twoway_merge\" version of builtin-clone in my personal tree.\n> \n>  builtin-clone.c  |    3 +++\n>  t/t5601-clone.sh |    7 +++++++\n>  2 files changed, 10 insertions(+), 0 deletions(-)\n> \n> diff --git a/builtin-clone.c b/builtin-clone.c\n> index a7c075d..8713128 100644\n> --- a/builtin-clone.c\n> +++ b/builtin-clone.c\n> @@ -525,7 +525,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n>  \n>  \t\tmemset(&opts, 0, sizeof opts);\n>  \t\topts.update = 1;\n> +\t\topts.merge = 1;\n> +\t\topts.fn = oneway_merge;\n>  \t\topts.verbose_update = !option_quiet;\n> +\t\topts.src_index = &the_index;\n>  \t\topts.dst_index = &the_index;\n>  \n>  \t\ttree = parse_tree_indirect(remote_head->old_sha1);\n> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\n> index dc9d63d..593d1a3 100755\n> --- a/t/t5601-clone.sh\n> +++ b/t/t5601-clone.sh\n> @@ -23,4 +23,11 @@ test_expect_success 'clone with excess parameters' '\n>  \n>  '\n>  \n> +test_expect_success 'clone checks out files' '\n> +\n> +\tgit clone src dst &&\n> +\ttest -f dst/file\n> +\n> +'\n> +\n>  test_done\n> -- \n> 1.5.5.1.424.g3256b\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"77068","messageId":"B29804AB-7A06-4988-9C5F-27A5499601B5@sb.org","threadId":"13525","inReplyTo":"alpine.DEB.1.00.0805151042570.30431@racer","subject":"Re: [PATCH] builtin-clone: fix initial checkout","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-05-15T19:53:45Z","receivedAt":"2008-05-15T19:53:45Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On May 15, 2008, at 5:48 AM, Johannes Schindelin wrote:\n\n> Somewhere in the process of finishing up builtin-clone, the update of\n> the working tree was lost.  This was due to not using the option  \n> \"merge\"\n> for unpack_trees().\n>\n> Breakage noticed by Kevin Ballard.\n>\n> Test by Jeff King.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis patch fixes the issue for me. Thanks!\n\n-Kevin Ballard\n\n-- \nKevin Ballard\nhttp://kevin.sb.org\nkevin@sb.org\nhttp://www.tildesoft.com\n"}]}