Hi, I've been tracking down a bug today that I traced to Grit accessing the wrong index of the line match when reading packed-refs. It was '3' and should be '2'. This means it's always falling through to git's rev-parse if it gets that far.
Fixed incorrect match array access in rev_parse
Grit is no longer maintained. See #183 and check out libgit2/rugged.