git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 1/6] diff: add a config option to control orderfile

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Apr 23, 2014, 12:14 UTC
Message-ID
<1398255277-26303-1-git-send-email-mst@redhat.com>

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
Next: Michael S. Tsirkin
Message 1 of 15 in “diff: add a config option to control orderfile”
  1. 1/6 diff: add a config option to control orderfileMichael S. Tsirkin, Apr 23, 2014
  2. 2/6 test: add test_write_lines helperMichael S. Tsirkin, Apr 23, 2014
  3. Junio C HamanoApr 23, 2014
  4. Michael S. TsirkinApr 23, 2014
  5. 3/6 tests: new test for orderfile optionsMichael S. Tsirkin, Apr 23, 2014
  6. Junio C HamanoApr 23, 2014
  7. Michael S. TsirkinApr 23, 2014
  8. 4/6 patch-id: make it stable against hunk reorderingMichael S. Tsirkin, Apr 23, 2014
  9. Junio C HamanoApr 23, 2014
  10. Michael S. TsirkinApr 23, 2014
  11. Junio C HamanoApr 23, 2014
  12. Michael S. TsirkinApr 24, 2014
  13. Junio C HamanoApr 24, 2014
  14. 5/6 patch-id: document new behaviourMichael S. Tsirkin, Apr 23, 2014
  15. 6/6 patch-id-test: test stable and unstable behaviourMichael S. Tsirkin, Apr 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.