diff options
Diffstat (limited to 'send-pack.c')
-rw-r--r-- | send-pack.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/send-pack.c b/send-pack.c index 7ad1a5968..949cb61aa 100644 --- a/send-pack.c +++ b/send-pack.c @@ -48,7 +48,7 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru NULL, NULL, }; - struct child_process po; + struct child_process po = CHILD_PROCESS_INIT; int i; i = 4; @@ -60,7 +60,6 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru argv[i++] = "-q"; if (args->progress) argv[i++] = "--progress"; - memset(&po, 0, sizeof(po)); po.argv = argv; po.in = -1; po.out = args->stateless_rpc ? -1 : fd; @@ -232,15 +231,15 @@ static int generate_push_cert(struct strbuf *req_buf, const char *push_cert_nonce) { const struct ref *ref; - char stamp[60]; char *signing_key = xstrdup(get_signing_key()); const char *cp, *np; struct strbuf cert = STRBUF_INIT; int update_seen = 0; - datestamp(stamp, sizeof(stamp)); strbuf_addf(&cert, "certificate version 0.1\n"); - strbuf_addf(&cert, "pusher %s %s\n", signing_key, stamp); + strbuf_addf(&cert, "pusher %s ", signing_key); + datestamp(&cert); + strbuf_addch(&cert, '\n'); if (args->url && *args->url) { char *anon_url = transport_anonymize_url(args->url); strbuf_addf(&cert, "pushee %s\n", anon_url); |