Patrick Steinhardt <ps@xxxxxx> writes: > ... But the problem is that tools like git-update-ref(1) don't > enforce this, so something like `git update-ref foo/bar HEAD` happily > creates "$GIT_DIR/foo/bar". And I bet there are other ways to write refs > at arbitrary paths. I think we should tighten things up over time. First by teaching the ref backend that anything that is not a pseudoref, HEAD or a proper ref (one item of whose definition is "lives under refs/ hierarchy) should not resolve_ref() successfully. That should correctly fail things like $ git rev-parse worktrees/$name/bisect/bad $ git update-ref foo/bar HEAD I'd hope. Thanks.