Use libgit2 for reading refs