unsigned char sha1[20];
const char *headpath = git_path("HEAD");
if (!read_ref(headpath, sha1))
- fn(headpath, sha1);
- return do_for_each_ref(get_refs_directory(), fn);
+ return fn(headpath, sha1);
+ return 0;
}
int for_each_ref(int (*fn)(const char *path, const unsigned char *sha1))