From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: head_points_at checked in as 47874d6 Date: Fri, 31 Mar 2006 00:59:21 +0900 Message-ID: <87fykzyld2.wl@mail2.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: git@vger.kernel.org X-From: git-owner@vger.kernel.org Thu Mar 30 17:59:57 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOzYr-0004ox-BO for gcvg-git@gmane.org; Thu, 30 Mar 2006 17:59:49 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125AbWC3P7p (ORCPT ); Thu, 30 Mar 2006 10:59:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932151AbWC3P7p (ORCPT ); Thu, 30 Mar 2006 10:59:45 -0500 Received: from shop.atmark-techno.com ([210.191.215.173]:13034 "EHLO mail2.atmark-techno.com") by vger.kernel.org with ESMTP id S932125AbWC3P7p (ORCPT ); Thu, 30 Mar 2006 10:59:45 -0500 Received: from smtp.local-network (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id E90CA4CCF; Fri, 31 Mar 2006 00:59:27 +0900 (JST) Received: from localhost.atmark-techno.com (unknown [192.168.10.81]) by smtp.local-network (Postfix) with ESMTP id E2303B61F; Fri, 31 Mar 2006 01:04:40 +0900 (JST) To: Junio C Hamano User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Hi Junio, Would you kindly explain what you are intended to do with the following code checked in as 47874d6d9a7f49ade6388df049597f03365961ca ? # The name under $remote_top the remote HEAD seems to point at head_points_at=$( ( echo "master" cd "$GIT_DIR/$remote_top" && find . -type f -print | sed -e 's/^\.\///' ) | ( done=f while read name do test t = $done && continue branch_tip=`cat "$GIT_DIR/$remote_top/$name"` if test "$head_sha1" = "$branch_tip" then echo "$name" done=t fi done ) ) What I don't understand are: - why do we have to do 'echo "master"' for the top of the loop? is this an optimization? - why do we keep looping after done=t? I just noticed this when I tried to clone a repo _without_ master branch. Thanks for your time. And sorry for my ignorants. -- yashi