aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-07 00:10:14 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-07 00:10:14 -0800
commit7bb5321be0ecb70a990ad49da2a1366c19201372 (patch)
tree82a8429e88beddb3b8bf8fb84aa39800670ae31d /diff.c
parentff32340669a5521ca2b4b547b4853bfe22f60386 (diff)
parent6d0e674a575421347abe5749e645ca6dc78c8207 (diff)
downloadgit-7bb5321be0ecb70a990ad49da2a1366c19201372.tar.gz
git-7bb5321be0ecb70a990ad49da2a1366c19201372.tar.xz
Merge branch 'rs/diff-ihc'
* rs/diff-ihc: diff: add option to show context between close hunks Conflicts: Documentation/diff-options.txt
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index c159a5fc6..d23548292 100644
--- a/diff.c
+++ b/diff.c
@@ -1469,6 +1469,7 @@ static void builtin_diff(const char *name_a,
ecbdata.file = o->file;
xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts;
xecfg.ctxlen = o->context;
+ xecfg.interhunkctxlen = o->interhunkcontext;
xecfg.flags = XDL_EMIT_FUNCNAMES;
if (pe)
xdiff_set_find_func(&xecfg, pe->pattern, pe->cflags);
@@ -2538,6 +2539,9 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->b_prefix = arg + 13;
else if (!strcmp(arg, "--no-prefix"))
options->a_prefix = options->b_prefix = "";
+ else if (opt_arg(arg, '\0', "inter-hunk-context",
+ &options->interhunkcontext))
+ ;
else if (!prefixcmp(arg, "--output=")) {
options->file = fopen(arg + strlen("--output="), "w");
options->close_file = 1;