No, that's not true. Its common practice to try and use the first ref in FETCH_HEAD as though it were a normal ref. So we should support reading it here, we just need to only read the first 40 bytes of it. :-)

The main reason we have the too large error is to fail out fast if we read a symbolic reference that has an insane name within it. If the name exceeds the reasonable length we support here, the ref name might be truncated and fail to be read correctly. But we have a limit here to prevent reading some massive binary file that was accidentally placed into the refs/ directory, sucking all of that into the JVM as a byte[] would be painful.

My proposed IO.readSome(path, limit) would need an additional check here, if isSymRef(buf, n) is true and n.length == limit then we need to abort and refuse to process this ref, as its a potentially truncated symbolic reference.