From: Jeff King Date: Thu, 29 Jan 2009 08:30:16 +0000 (-0500) Subject: validate_headref: tighten ref-matching to just branches X-Git-Tag: v1.6.2-rc0~17^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b229d18a809c169314b7f0d048dc5a7632e8f916?ds=inline;hp=b229d18a809c169314b7f0d048dc5a7632e8f916 validate_headref: tighten ref-matching to just branches When we are trying to determine whether a directory contains a git repository, one of the tests we do is to check whether HEAD is either a symlink or a symref into the "refs/" hierarchy, or a detached HEAD. We can tighten this a little more, though: a non-detached HEAD should always point to a branch (since checking out anything else should result in detachment), so it is safe to check for "refs/heads/". Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---