Code

gitweb: Change to use explicitly function call cgi->escapHTML()
[git.git] / builtin-fsck.c
index fec1cbd784f598342eb44f385a55dba25a0b9021..6da3814d59a2c04cbcc9853035f5d72c0a3a4928 100644 (file)
@@ -117,7 +117,7 @@ static void check_unreachable_object(struct object *obj)
 
        /*
         * "!used" means that nothing at all points to it, including
-        * other unreacahble objects. In other words, it's the "tip"
+        * other unreachable objects. In other words, it's the "tip"
         * of some set of unreachable objects, usually a commit that
         * got dropped.
         *
@@ -477,6 +477,12 @@ static int fsck_handle_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
        return 0;
 }
 
+static int fsck_handle_reflog(const char *logname, const unsigned char *sha1, int flag, void *cb_data)
+{
+       for_each_reflog_ent(logname, fsck_handle_reflog_ent, NULL);
+       return 0;
+}
+
 static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
 {
        struct object *obj;
@@ -495,14 +501,13 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int f
        obj->used = 1;
        mark_reachable(obj, REACHABLE);
 
-       for_each_reflog_ent(refname, fsck_handle_reflog_ent, NULL);
-
        return 0;
 }
 
 static void get_default_heads(void)
 {
        for_each_ref(fsck_handle_ref, NULL);
+       for_each_reflog(fsck_handle_reflog, NULL);
 
        /*
         * Not having any default heads isn't really fatal, but