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:
2
refs.h
2
refs.h
@ -5,7 +5,7 @@
|
||||
* Calls the specified function for each ref file until it returns nonzero,
|
||||
* and returns the value
|
||||
*/
|
||||
extern int for_each_ref(int (*fn)(const char *path, unsigned char *sha1));
|
||||
extern int for_each_ref(int (*fn)(const char *path, const unsigned char *sha1));
|
||||
|
||||
/** Reads the refs file specified into sha1 **/
|
||||
extern int get_ref_sha1(const char *ref, unsigned char *sha1);
|
||||
|
||||
Reference in New Issue
Block a user