mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
Fix silly thinko in "head_ref()"
It did a "for_each_ref()" in addition to the HEAD case, which was a left-over from an early broken test.
This commit is contained in:
parent
41cb7488b9
commit
2f34ba32dd
4
refs.c
4
refs.c
@ -73,8 +73,8 @@ int head_ref(int (*fn)(const char *path, const unsigned char *sha1))
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user