summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-14 12:57:17 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-14 12:57:17 -0800
commit63d37c3062e13cb2828edf63bc03cce1b6c41fd0 (patch)
tree058aa2fe3f357e626c3458a89443ea07fa0f5345 /diff.c
parent5f90b6fa0f5cf1d06bc72ffe607be3cd6aa955b5 (diff)
parent6680a0874f86600cc8b4b5327384934d83d752a8 (diff)
downloadgit-63d37c3062e13cb2828edf63bc03cce1b6c41fd0.tar.gz
Merge branch 'jk/userdiff-config-simplify'
* jk/userdiff-config-simplify: drop odd return value semantics from userdiff_config
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/diff.c b/diff.c
index 84780fd5e6..3550c18e39 100644
--- a/diff.c
+++ b/diff.c
@@ -177,11 +177,8 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
return 0;
}
- switch (userdiff_config(var, value)) {
- case 0: break;
- case -1: return -1;
- default: return 0;
- }
+ if (userdiff_config(var, value) < 0)
+ return -1;
if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) {
int slot = parse_diff_color_slot(var, 11);