summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 22:45:00 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 22:45:00 (GMT)
commit2f34ba32dde0131ab280f8ca902f04e39af7dcc0 (patch)
tree053ce86ccb2a1c753d7282a4ea47fea6b3cb2f60
parent41cb7488b9e5998ce1d665bbe10beca0a0f69c1c (diff)
downloadgit-2f34ba32dde0131ab280f8ca902f04e39af7dcc0.zip
git-2f34ba32dde0131ab280f8ca902f04e39af7dcc0.tar.gz
git-2f34ba32dde0131ab280f8ca902f04e39af7dcc0.tar.bz2
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.
-rw-r--r--refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 6ca04d3..09c9f90 100644
--- a/refs.c
+++ b/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))