Re: [PATCH v2 3/7] rebase: add support for multiple hooks
From: brian m. carlson <hidden>
Date: 2019-05-15 22:55:46
Attachments
- signature.asc [application/pgp-signature] 868 bytes
From: brian m. carlson <hidden>
Date: 2019-05-15 22:55:46
On Tue, May 14, 2019 at 07:56:49PM +0700, Duy Nguyen wrote:
On Tue, May 14, 2019 at 7:24 AM brian m. carlson [off-list ref] wrote:quoted
- close(cp.in);In the old code, we close cp.in...quoted
+int post_rewrite_rebase_hook(const char *name, const char *path, void *input) +{ + struct child_process child = CHILD_PROCESS_INIT; + + child.in = open(input, O_RDONLY); + child.stdout_to_stderr = 1; + child.trace2_hook_name = "post-rewrite";maybe use "name" and avoid hard coding "post-rewrite".quoted
+ argv_array_push(&child.args, path); + argv_array_push(&child.args, "rebase"); + return run_command(&child);... but in the new one we don't. Smells fd leaking to me.
Ah, good point. Will fix. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204