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 > <sandals@xxxxxxxxxxxxxxxxxxxx> wrote: > > - close(cp.in); > > In the old code, we close cp.in... > > > +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". > > > + 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
Attachment:
signature.asc
Description: PGP signature