Merge branch 'vs/completion-branch-fully-spelled-d-m-r'
[gitweb.git] / t / helper / test-submodule-config.c
index 2cffded116f77d7c62ee718fa08558b52574a205..2f144d539a4822619a9383ded2d3adb270484624 100644 (file)
@@ -23,7 +23,7 @@ int cmd_main(int argc, const char **argv)
 
        arg++;
        my_argc--;
-       while (starts_with(arg[0], "--")) {
+       while (arg[0] && starts_with(arg[0], "--")) {
                if (!strcmp(arg[0], "--url"))
                        output_url = 1;
                if (!strcmp(arg[0], "--name"))
@@ -49,7 +49,7 @@ int cmd_main(int argc, const char **argv)
                path_or_name = arg[1];
 
                if (commit[0] == '\0')
-                       hashcpy(commit_sha1, null_sha1);
+                       hashclr(commit_sha1);
                else if (get_sha1(commit, commit_sha1) < 0)
                        die_usage(argc, argv, "Commit not found.");