ls-tree: --name-only
[gitweb.git] / hash-object.c
index c3d05a853a5518d2800eb65a00c181f6d8ab312f..ccba11cb32fb6989c9c0365097de2fa39197de25 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
        int i;
        const char *type = "blob";
        int write_object = 0;
-       const char *prefix;
+       const char *prefix = NULL;
        int prefix_length = -1;
 
        for (i = 1 ; i < argc; i++) {
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
                        write_object = 1;
                }
                else {
-                       char *arg = argv[i];
+                       const char *arg = argv[i];
                        if (0 <= prefix_length)
                                arg = prefix_filename(prefix, prefix_length,
                                                      arg);