summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 63e8dc5)
raw | patch | inline | side by side (parent: 63e8dc5)
author | Jeff King <peff@peff.net> | |
Mon, 8 Dec 2008 02:54:17 +0000 (21:54 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 8 Dec 2008 03:59:25 +0000 (19:59 -0800) |
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>
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>
builtin-diff.c | patch | blob | history | |
builtin-log.c | patch | blob | history | |
wt-status.c | patch | blob | history |
diff --git a/builtin-diff.c b/builtin-diff.c
index dddcf697d7447b11d618ac5983516fd1789b0d39..d75d69bf5774ffd402bbeec47b9a0e0800554d63 100644 (file)
--- a/builtin-diff.c
+++ b/builtin-diff.c
/* 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");
}
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
diff --git a/builtin-log.c b/builtin-log.c
index b164717379627b7bfc303bd3fdf360ecd2db152d..840daf907897391fb193706982e2274c2a9e1014 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
DIFF_OPT_SET(&rev->diffopt, RECURSIVE);
rev->show_root_diff = default_show_root;
rev->subject_prefix = fmt_patch_subject_prefix;
+ DIFF_OPT_SET(&rev->diffopt, ALLOW_TEXTCONV);
if (default_date_mode)
rev->date_mode = parse_date_format(default_date_mode);
} else
die("unrecognized argument: %s", arg);
}
- DIFF_OPT_SET(&rev->diffopt, ALLOW_TEXTCONV);
}
/*
diff --git a/wt-status.c b/wt-status.c
index 3edae43ce9d99b27ed69166d90db71bc3c219404..96ff2f8f564b907b9ef77bd2ea41b5e854a13085 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
struct rev_info rev;
init_revisions(&rev, NULL);
+ DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
setup_revisions(0, NULL, &rev,
s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference);
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
rev.diffopt.detect_rename = 1;
- DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
rev.diffopt.file = s->fp;
rev.diffopt.close_file = 0;
/*