On 02/14, Jeff King wrote: > Originally, we set up the threads for grep before parsing > the non-option arguments. In 53b8d931b (grep: disable > threading in non-worktree case, 2011-12-12), the thread code > got bumped lower in the function because it now needed to > know whether we got any revision arguments. > > That put a big block of code in between the parsing of revs > and the parsing of pathspecs, both of which share some loop > variables. That makes it harder to read the code than the > original, where the shared loops were right next to each > other. > > Let's bump the thread initialization until after all of the > parsing is done. > > Signed-off-by: Jeff King <peff@xxxxxxxx> > --- > I double-checked to make sure no other code was relying on > the thread setup having happened. I think we could actually > bump it quite a bit lower (to right before we actually start > grepping), but I doubt it matters much in practice. Looks good. And yes I don't believe anything needs the thread initialization to happen earlier. -- Brandon Williams