path: root/userdiff.c
diff options
authorJeff King <>2008-10-26 04:45:55 (GMT)
committerJunio C Hamano <>2008-10-26 21:09:48 (GMT)
commitc7534ef4a12bb44806d522fc8e3961e390f9169b (patch)
tree2183c3a803c4772c6d7c1b7ecdc6dcdd88785853 /userdiff.c
parent04427ac8483f61dcb01a48c78a821f5042c88195 (diff)
userdiff: require explicitly allowing textconv
Diffs that have been produced with textconv almost certainly cannot be applied, so we want to be careful not to generate them in things like format-patch. This introduces a new diff options, ALLOW_TEXTCONV, which controls this behavior. It is off by default, but is explicitly turned on for the "log" family of commands, as well as the "diff" porcelain (but not diff-* plumbing). Because both text conversion and external diffing are controlled by these diff options, we can get rid of the "plumbing versus porcelain" distinction when reading the config. This was an attempt to control the same thing, but suffered from being too coarse-grained. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'userdiff.c')
1 files changed, 1 insertions, 9 deletions
diff --git a/userdiff.c b/userdiff.c
index d95257a..3681062 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -120,7 +120,7 @@ static int parse_tristate(int *b, const char *k, const char *v)
return 1;
-int userdiff_config_basic(const char *k, const char *v)
+int userdiff_config(const char *k, const char *v)
struct userdiff_driver *drv;
@@ -130,14 +130,6 @@ int userdiff_config_basic(const char *k, const char *v)
return parse_funcname(&drv->funcname, k, v, REG_EXTENDED);
if ((drv = parse_driver(k, v, "binary")))
return parse_tristate(&drv->binary, k, v);
- return 0;
-int userdiff_config_porcelain(const char *k, const char *v)
- struct userdiff_driver *drv;
if ((drv = parse_driver(k, v, "command")))
return parse_string(&drv->external, k, v);
if ((drv = parse_driver(k, v, "textconv")))