[PATCH v4 1/6] diff: add a config option to control orderfile
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2016-06-15 23:00:47
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2016-06-15 23:00:47
Subsystem:
the rest · Maintainer:
Linus Torvalds
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> --- diff.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/diff.c b/diff.c
index b79432b..6bcb26b 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 (starts_with(var, "submodule.")) return parse_submodule_config_option(var, value);
--
MST