Fix up "for_each_ref()" to be more usable, and use it in git-fsck-cache

It needed to take the GIT_DIR information into account, something that
the original receive-pack usage just never cared about.
This commit is contained in:
Linus Torvalds
2005-07-03 10:01:38 -07:00
parent 7ec4e60819
commit 944d858969
4 changed files with 18 additions and 63 deletions

View File

@ -7,7 +7,7 @@ static const char receive_pack_usage[] = "git-receive-pack <git-dir>";
static const char *unpacker = "git-unpack-objects";
static int show_ref(const char *path, unsigned char *sha1)
static int show_ref(const char *path, const unsigned char *sha1)
{
packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
return 0;