{"thread":{"id":"4286","subject":"[PATCH] ls-remote fix for rsync:// transport","startedAt":"2006-05-25T04:22:17Z","lastAt":"2006-05-25T05:01:25Z","messageCount":2,"participants":["Junio C Hamano","Sean"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20665","messageId":"7v7j4a3f9i.fsf@assigned-by-dhcp.cox.net","threadId":"4286","inReplyTo":null,"subject":"[PATCH] ls-remote fix for rsync:// transport","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-25T04:22:17Z","receivedAt":"2006-05-25T04:22:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this would fix the \"cloning rsync:// clones repository fine but\ndoes not check out the working tree\" problem.\n\n---\ndiff --git a/git-ls-remote.sh b/git-ls-remote.sh\nindex b6882a9..6b21879 100755\n--- a/git-ls-remote.sh\n+++ b/git-ls-remote.sh\n@@ -58,7 +58,8 @@ http://* | https://* )\n \t;;\n \n rsync://* )\n-\tmkdir $tmpdir\n+\tmkdir $tmpdir &&\n+\trsync -rlq \"$peek_repo/HEAD\" $tmpdir &&\n \trsync -rq \"$peek_repo/refs\" $tmpdir || {\n \t\techo \"failed\tslurping\"\n \t\texit\n@@ -69,6 +70,13 @@ rsync://* )\n \t\tcat \"$tmpdir/$path\" | tr -d '\\012'\n \t\techo \"\t$path\"\n \tdone &&\n+\thead=$(cat \"$tmpdir/HEAD\") &&\n+\tcase \"$head\" in\n+\tref:' '*)\n+\t\thead=$(expr \"z$head\" : 'zref: \\(.*\\)') &&\n+\t\thead=$(cat \"$tmpdir/$head\") || exit\n+\tesac &&\n+\techo \"$head\tHEAD\" \n \trm -fr $tmpdir\n \t;;\n \n"},{"id":"20670","messageId":"BAYC1-PASMTP073667D87F8BC653B62894AE990@CEZ.ICE","threadId":"4286","inReplyTo":"7v7j4a3f9i.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] ls-remote fix for rsync:// transport","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-25T05:01:25Z","receivedAt":"2006-05-25T05:01:25Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Wed, 24 May 2006 21:22:17 -0700\nJunio C Hamano <junkio@cox.net> wrote:\n\n> I think this would fix the \"cloning rsync:// clones repository fine but\n> does not check out the working tree\" problem.\n\nNice find, works here.\n\nSean\n"}]}