Sven Verdoolaege, Sat, Jun 30, 2007 15:45:44 +0200: > On Sat, Jun 30, 2007 at 03:33:10PM +0200, Alex Riesen wrote: > > Sven Verdoolaege, Fri, Jun 29, 2007 10:31:08 +0200: > > > + head_sha1=`cat "$GIT_DIR/REMOTE_HEAD"` > > > + case "$head_sha1" in > > > + 'ref: refs/'*) > > > + ;; > > > > And what do you do if the HEAD is a reflink on something not in refs/? > > Like "ref: tmp"? Yes, it is unlikely, but is not forbidden. > > It may not be forbidden, but I don't think it would > work with current git-clone either. > Every command which needs a proper .git will not work, so I take this back completely. The check for .git validity includes checking if HEAD contains something sane, and this check is very simple: the HEAD is read (readlink(2) or plain read(2)) and tested if it contains a reference starting with "refs/", which maybe inconsistent with resolve_gitlink_ref, but probably ok. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html