diff options
author | Jeff King <peff@peff.net> | 2008-12-07 21:54:17 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-12-07 19:59:25 -0800 |
commit | 5ec11af61d907311e4e1b21e10009b06dc2cf74a (patch) | |
tree | 898c41036a30cab06466e64b95c27fee5f17529c /builtin-diff.c | |
parent | read-cache.c: typofix in comment (diff) | |
download | tgif-5ec11af61d907311e4e1b21e10009b06dc2cf74a.tar.xz |
reorder ALLOW_TEXTCONV option setting
Right now for the diff porcelain and the log family, we
call:
init_revisions();
setup_revisions();
DIFF_OPT_SET(ALLOW_TEXTCONV);
However, that means textconv will _always_ be on, instead of
being a default that can be manipulated with
setup_revisions. Instead, we want:
init_revisions();
DIFF_OPT_SET(ALLOW_TEXTCONV);
setup_revisions();
which is what this patch does.
We'll go ahead and move the callsite in wt-status, also;
even though the user can't pass any options here, it is a
cleanup that will help avoid any surprise later if the
setup_revisions line is changed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index dddcf697d7..d75d69bf57 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -290,8 +290,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix) /* Otherwise, we are doing the usual "git" diff */ rev.diffopt.skip_stat_unmatch = !!diff_auto_refresh_index; - /* Default to let external be used */ + /* Default to let external and textconv be used */ DIFF_OPT_SET(&rev.diffopt, ALLOW_EXTERNAL); + DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV); if (nongit) die("Not a git repository"); @@ -303,7 +304,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix) } DIFF_OPT_SET(&rev.diffopt, RECURSIVE); - DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV); /* * If the user asked for our exit code then don't start a |