From: Jonathan Tan Date: Fri, 24 Feb 2023 22:33:13 GMT Subject: Re: [PATCH 04/11] unpack-trees: clean up some flow control Message-ID: <20230224223313.1509428-1-jonathantanmy@google.com> In-Reply-To: "Elijah Newren via GitGitGadget" writes: > * update_sparsity() has a check early on that will BUG() if > o->skip_sparse_checkout is set; as such, there's no need to check > for that condition again later in the code. We can simply remove > the check and its corresponding goto label. [snip] > @@ -2113,8 +2115,6 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o) > memset(&pl, 0, sizeof(pl)); > free_pattern_list = 1; > populate_from_existing_patterns(o, &pl); > - if (o->skip_sparse_checkout) > - goto skip_sparse_checkout; I've verified that indeed there is a prior check that o->skip_sparse_checkout is not set (not visible in the diff). Up to here, everything looks good.