From: Junio C Hamano Date: Sat, 14 Feb 2009 20:19:11 GMT Subject: Re: [PATCH v2] config: Use parseopt. Message-ID: <7viqncsreo.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: >> + else if (given_config_file) { >> + if (!is_absolute_path(given_config_file) && file) >> + file = prefix_filename(file, strlen(file), >> + given_config_file); >> + else >> + file = given_config_file; >> + config_exclusive_filename = file; > > It took me a considerable amount of time to figure out that "file" is > actually the "prefix"! That cleanup would be nice to have before the > parseopt patch, methinks, especially since the code is reindented, and > thus hard to follow in the diff. I noticed that "file" thing during my review of the first round. It probably was a cute attempt to avoid using two variables "prefix" and "file", but made the result a lot harder to read. I agree that a clean-up *before* code restructuring would be good for this particular wart. A note that is off-topic to this patch. I also noticed that the diff was impossible to read because it matched the lines with only an indented close brace or whitespace between the preimage and the postimage too aggressively. Your --patience did seem to help a little bit, at least it produced a different result, but not much (not that patience was meant to make this kind of change easier to read). It may have helped if we had that "do not match trivial lines too aggressively just to reduce the patch size" option.