{"thread":{"id":"3758","subject":"head_points_at checked in as 47874d6","startedAt":"2006-03-30T15:59:21Z","lastAt":"2006-03-30T15:59:21Z","messageCount":1,"participants":["Yasushi SHOJI"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"18148","messageId":"87fykzyld2.wl@mail2.atmark-techno.com","threadId":"3758","inReplyTo":null,"subject":"head_points_at checked in as 47874d6","fromName":"Yasushi SHOJI","fromEmail":"yashi@atmark-techno.com","sentAt":"2006-03-30T15:59:21Z","receivedAt":"2006-03-30T15:59:21Z","isPatch":false,"sender":{"key":"yashi@atmark-techno.com","avatar":"https://gravatar.com/avatar/4817e8703ac4379935834d87453faa9d0c94b9dc19d83fcc54c67875eb133e59?d=mp&s=160"},"body":"Hi Junio,\n\nWould you kindly explain what you are intended to do with the\nfollowing code checked in as 47874d6d9a7f49ade6388df049597f03365961ca ?\n\n\t# The name under $remote_top the remote HEAD seems to point at\n\thead_points_at=$(\n\t\t(\n\t\t\techo \"master\"\n\t\t\tcd \"$GIT_DIR/$remote_top\" &&\n\t\t\tfind . -type f -print | sed -e 's/^\\.\\///'\n\t\t) | (\n\t\tdone=f\n\t\twhile read name\n\t\tdo\n\t\t\ttest t = $done && continue\n\t\t\tbranch_tip=`cat \"$GIT_DIR/$remote_top/$name\"`\n\t\t\tif test \"$head_sha1\" = \"$branch_tip\"\n\t\t\tthen\n\t\t\t\techo \"$name\"\n\t\t\t\tdone=t\n\t\t\tfi\n\t\tdone\n\t\t)\n\t)\n\nWhat I don't understand are:\n\n- why do we have to do 'echo \"master\"' for the top of the loop?  is\nthis an optimization?\n- why do we keep looping after done=t?\n\nI just noticed this when I tried to clone a repo _without_ master\nbranch.\n\nThanks for your time. And sorry for my ignorants.\n--\n       yashi\n"}]}