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

[PATCH 4/5] diff.c: Use 'git_config_string' to get 'diff.external'

From
Brian Hetro <whee@smaertness.net>
Date
Jul 5, 2008, 05:24 UTC
Message-ID
<1addd570c31b5f1b09bde0d330c4094714cac624.1215234749.git.whee@smaertness.net>
In-Reply-To
<81a6961a970f77cc8166c1ae59cae6326bc5c143.1215234749.git.whee@smaertness.net>
Signed-off-by: Brian Hetro <whee@smaertness.net>
---
 diff.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/diff.c b/diff.c
index 803fbba..6a39b39 100644
--- a/diff.c
+++ b/diff.c
@@ -153,12 +153,8 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
 		diff_auto_refresh_index = git_config_bool(var, value);
 		return 0;
 	}
-	if (!strcmp(var, "diff.external")) {
-		if (!value)
-			return config_error_nonbool(var);
-		external_diff_cmd_cfg = xstrdup(value);
-		return 0;
-	}
+	if (!strcmp(var, "diff.external"))
+		return git_config_string(&external_diff_cmd_cfg, var, value);
 	if (!prefixcmp(var, "diff.")) {
 		const char *ep = strrchr(var, '.');
 
-- 
1.5.6.1.204.g699135
Previous: Brian HetroNext: Brian Hetro
Message 5 of 7 in “git_config_string janitorial conversions.”
  1. 0/5 git_config_string janitorial conversions.Brian Hetro, Jul 5, 2008
  2. 1/5 builtin-commit.c: Use 'git_config_string' to get 'commit.template'Brian Hetro, Jul 5, 2008
  3. 2/5 builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'Brian Hetro, Jul 5, 2008
  4. 3/5 convert.c: Use 'git_config_string' to get 'smudge' and 'clean'Brian Hetro, Jul 5, 2008
  5. 4/5 diff.c: Use 'git_config_string' to get 'diff.external'Brian Hetro, Jul 5, 2008
  6. 5/5 http.c: Use 'git_config_string' to clean up SSL config.Brian Hetro, Jul 5, 2008
  7. Christian CouderJul 6, 2008

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.