]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs.c
test: make FILEMODE a lazy prereq
[thirdparty/git.git] / refs.c
diff --git a/refs.c b/refs.c
index 3710748ab88d8fa4639c3a0a436ca0e2b0c25552..5e5a3824b992132aaac8d86698feebcb773e13c6 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -947,13 +947,6 @@ static struct ref_cache *get_ref_cache(const char *submodule)
        return refs;
 }
 
-void invalidate_ref_cache(const char *submodule)
-{
-       struct ref_cache *refs = get_ref_cache(submodule);
-       clear_packed_ref_cache(refs);
-       clear_loose_ref_cache(refs);
-}
-
 /* The length of a peeled reference line in packed-refs, including EOL: */
 #define PEELED_LINE_LENGTH 42
 
@@ -3376,7 +3369,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
                size_t total_len = 0;
 
                /* the rule list is NULL terminated, count them first */
-               for (; ref_rev_parse_rules[nr_rules]; nr_rules++)
+               for (nr_rules = 0; ref_rev_parse_rules[nr_rules]; nr_rules++)
                        /* no +1 because strlen("%s") < strlen("%.*s") */
                        total_len += strlen(ref_rev_parse_rules[nr_rules]);