"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: Elijah Newren <newren@xxxxxxxxx> > > check_updates() has a lot of code that repeatedly checks whether > o->update or o->dry_run are set. (Note that o->dry_run is a > near-synonym for !o->update, but not quite as per commit 2c9078d05bf2 > ("unpack-trees: add the dry_run flag to unpack_trees_options", > 2011-05-25).) In fact, this function almost turns into a no-op whenever > the condition > !o->update || o->dry_run > is met. Simplify the code by checking this condition at the beginning > of the function, and when it is true, do the few things that are > relevant and return early. Thanks; will queue.