Merge branch 'jm/maint-strncpy-diff-no-index'
[gitweb.git] / builtin / fetch.c
index 8ec4eae3eb78925de41253264380ea5585b0f091..cfb43df4e843970a7ff93078ea1bcbbdb9985260 100644 (file)
@@ -300,11 +300,11 @@ static int update_local_ref(struct ref *ref,
                else {
                        msg = "storing head";
                        what = _("[new branch]");
-                       if ((recurse_submodules != RECURSE_SUBMODULES_OFF) &&
-                           (recurse_submodules != RECURSE_SUBMODULES_ON))
-                               check_for_new_submodule_commits(ref->new_sha1);
                }
 
+               if ((recurse_submodules != RECURSE_SUBMODULES_OFF) &&
+                   (recurse_submodules != RECURSE_SUBMODULES_ON))
+                       check_for_new_submodule_commits(ref->new_sha1);
                r = s_update_ref(msg, ref, 0);
                strbuf_addf(display, "%c %-*s %-*s -> %s%s",
                            r ? '!' : '*',
@@ -585,7 +585,7 @@ static void find_non_local_tags(struct transport *transport,
 
        for_each_ref(add_existing, &existing_refs);
        for (ref = transport_get_remote_refs(transport); ref; ref = ref->next) {
-               if (prefixcmp(ref->name, "refs/tags"))
+               if (prefixcmp(ref->name, "refs/tags/"))
                        continue;
 
                /*