Merge branch 'jk/fsck-exit-code-fix'
[gitweb.git] / builtin / notes.c
index 820c34135cab439e2168dd08947bd79d7ed7ae71..67d0bb14f8f18003d6a073b0c264f5b46ca12685 100644 (file)
@@ -122,12 +122,11 @@ static void write_commented_object(int fd, const unsigned char *object)
 {
        const char *show_args[5] =
                {"show", "--stat", "--no-notes", sha1_to_hex(object), NULL};
-       struct child_process show;
+       struct child_process show = CHILD_PROCESS_INIT;
        struct strbuf buf = STRBUF_INIT;
        struct strbuf cbuf = STRBUF_INIT;
 
        /* Invoke "git show --stat --no-notes $object" */
-       memset(&show, 0, sizeof(show));
        show.argv = show_args;
        show.no_stdin = 1;
        show.out = -1;
@@ -211,7 +210,7 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
                if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
                        error(_("unable to write note object"));
                        if (path)
-                               error(_("The note contents has been left in %s"),
+                               error(_("The note contents have been left in %s"),
                                      path);
                        exit(128);
                }