From: Junio C Hamano Date: Fri, 23 Jul 2010 21:03:49 GMT Subject: Re: [PATCH 5/5] rebase: protect against diff.renames configuration Message-ID: <7vvd85ewqy.fsf@alter.siamese.dyndns.org> In-Reply-To: Sverre Rabbelier writes: > On Fri, Jul 23, 2010 at 12:06, Jonathan Nieder wrote: >> The end user configuration for "diff" should not affect the result >> produced by the higher level command that is related to "diff" only >> because internally it is implemented in terms of it. > > Almost completely unrelated and perhaps not relevant, I seem to recall > that if you set 'ui.color' to 'always' you will get unapplyable > patches because 'git format-patch' will include the color in it's > output. Perhaps it should --no-color as well, while we're fixing it? I think that it actually was a mistake for git_diff_basic_config() to call git_color_default_config(). Parsing of diff.color. there is Ok and was justified by 9a1805a (add a "basic" diff config callback, 2008-01-04), but the change made to the function with 6b2f2d9 (Add color.ui variable which globally enables colorization if set, 2008-02-18) was probably a screw-up. The call should instead have gone to diff_ui_config(). I also think format_config() should be changed not to call log_config() (we need to move parsing of the format.subjectprefix from the latter to the former), and instead call diff_basic_config() directly.