On Tue, Feb 14, 2017 at 04:34:18PM -0800, Stefan Beller wrote: > + prepare_submodule_repo_env_no_git_dir(&cp.env_array); > + > + cp.git_cmd = 1; > + cp.no_stdin = 1; > + cp.dir = path; > + > + argv_array_pushf(&cp.args, "--super-prefix=%s/", path); > + argv_array_pushl(&cp.args, "read-tree", NULL); > + > + if (!dry_run) > + argv_array_push(&cp.args, "-u"); > + else > + argv_array_push(&cp.args, "-n"); I might write this as if (dry_run) argv_array_push(&cp.args, "-n"); else argv_array_push(&cp.args, "-u"); In other words, avoiding the negation when you have an else branch. I can also see an argument for keeping the condition identical to the other branches, though. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204
Attachment:
signature.asc
Description: PGP signature