head_points_at checked in as 47874d6

From: Yasushi SHOJI <yashi@atmark-techno.com>
Date: 2006-03-31 02:59:21
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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 31 03:00:26 2006

This archive was generated by hypermail 2.1.8 : 2006-03-31 03:00:40 EST