Code

lf_to_crlf_filter(): tell the caller we added "\n" when draining
[git.git] / submodule.c
index 7a76edf911d941722586abb4f38284fc4e6909ec..ad86534ba1e1e1726fd6427c65182ba954957904 100644 (file)
@@ -481,6 +481,10 @@ void check_for_new_submodule_commits(unsigned char new_sha1[20])
        const char *argv[] = {NULL, NULL, "--not", "--all", NULL};
        int argc = ARRAY_SIZE(argv) - 1;
 
+       /* No need to check if there are no submodules configured */
+       if (!config_name_for_path.nr)
+               return;
+
        init_revisions(&rev, NULL);
        argv[1] = xstrdup(sha1_to_hex(new_sha1));
        setup_revisions(argc, argv, &rev, NULL);