"J. Bruce Fields" <bfields@xxxxxxxxxxxx> writes: >> Oops, found it: >> >> git$ cat .git/master >> 407c0c87e15b3cf60347f4fc0bcdb4d239de4163 It _might_ make it safer to refuse creating anything outside refs/ if the name does not contain or ends with "HEAD" (or perhaps names that have chars outside "[_A-Z]"), but that would restrict future tools that might want to have HEAD-like files, so I am a bit hesitant. OTOH, a random file under .git/ does not count as a ref for the purposes of fsck/prune, so it may make sense to teach check_ref_format() about the same set of "special" names that can appear directly under .git without being in refs/ hierarchy (currently I think only "HEAD" and possibly "ORIG_HEAD" are in that set). BTW, git-merge.sh and git-reset.sh should use "git update-ref ORIG_HEAD" instead of doing it by hand using "echo >$GIT_DIR/ORIG_HEAD". Also, I *think* objects that are only reachable via ORIG_HEAD are not considered as reachable by fsck/prune --- we probably would want to fix this. - 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