git-hash-object.txt: document --literally option
[gitweb.git] / convert.c
index ab80b723574ff88b6c9c4a7c98c8821600f3e6bc..aa7a139bcf7f3d33511e106545e6d8989a0ffe35 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -321,7 +321,7 @@ static int filter_buffer(int in, int out, void *data)
        /*
         * Spawn cmd and feed the buffer contents through its stdin.
         */
-       struct child_process child_process;
+       struct child_process child_process = CHILD_PROCESS_INIT;
        struct filter_params *params = (struct filter_params *)data;
        int write_err, status;
        const char *argv[] = { NULL, NULL };
@@ -344,7 +344,6 @@ static int filter_buffer(int in, int out, void *data)
 
        argv[0] = cmd.buf;
 
-       memset(&child_process, 0, sizeof(child_process));
        child_process.argv = argv;
        child_process.use_shell = 1;
        child_process.in = -1;
@@ -1121,9 +1120,9 @@ static int is_foreign_ident(const char *str)
 {
        int i;
 
-       if (!starts_with(str, "$Id: "))
+       if (!skip_prefix(str, "$Id: ", &str))
                return 0;
-       for (i = 5; str[i]; i++) {
+       for (i = 0; str[i]; i++) {
                if (isspace(str[i]) && str[i+1] != '$')
                        return 1;
        }