Re: [PATCH] diff: add a config option to control orderfile
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 3, 2013, 17:12 UTC
- Message-ID
- <xmqqioyhu8wd.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20130831194425.GA14706@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
Show 6 quoted lines
> I always want my diffs to show header files first, > then .c files, then the rest. Make it possible to > set orderfile though a config option to achieve this. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > ---
I admit that I was the guilty one who introduced the orderfile, but I think the feature was misguided (for one thing, it breaks the patch-id, I think). So I am moderately hesitant to promote its use with an addition like this.
Show 16 quoted lines
> diff.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/diff.c b/diff.c > index 208094f..cca0767 100644 > --- a/diff.c > +++ b/diff.c > @@ -264,6 +264,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb) > return 0; > } > > + if (!strcmp(var, "diff.orderfile")) > + return git_config_string(&default_diff_options.orderfile, var, value); > + > if (!prefixcmp(var, "submodule.")) > return parse_submodule_config_option(var, value);