struct transport *transport,
                                           const char *shallow_file)
 {
-       struct child_process rev_list;
+       struct child_process rev_list = CHILD_PROCESS_INIT;
        const char *argv[9];
        char commit[41];
        unsigned char sha1[20];
                argv[ac++] = "--quiet";
        argv[ac] = NULL;
 
-       memset(&rev_list, 0, sizeof(rev_list));
        rev_list.argv = argv;
        rev_list.git_cmd = 1;
        rev_list.in = -1;
                memcpy(commit, sha1_to_hex(sha1), 40);
                if (write_in_full(rev_list.in, commit, 41) < 0) {
                        if (errno != EPIPE && errno != EINVAL)
-                               error(_("failed write to rev-list: %s"),
-                                     strerror(errno));
+                               error_errno(_("failed write to rev-list"));
                        err = -1;
                        break;
                }
        } while (!fn(cb_data, sha1));
 
-       if (close(rev_list.in)) {
-               error(_("failed to close rev-list's stdin: %s"), strerror(errno));
-               err = -1;
-       }
+       if (close(rev_list.in))
+               err = error_errno(_("failed to close rev-list's stdin"));
 
        sigchain_pop(SIGPIPE);
        return finish_command(&rev_list) || err;