summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-30 15:39:53 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-30 15:39:53 -0700
commit08585fd48d2d3d8facce9bdc366cfd896329a4b8 (patch)
tree731ec3979f6efde016abb6a06dcec0e184b640ea /diff.c
parentd1314826935392d38e3bb2df754762a402d0af00 (diff)
parent36617af7ed594d1928554356d809bd611c642dd2 (diff)
downloadgit-08585fd48d2d3d8facce9bdc366cfd896329a4b8.tar.gz
Merge branch 'ap/diff-ignore-blank-lines'
"git diff" learned a mode that ignores hunks whose change consists only of additions and removals of blank lines, which is the same as "diff -B" (ignore blank lines) of GNU diff. * ap/diff-ignore-blank-lines: diff: add --ignore-blank-lines option
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index f0b3e7cfe3..208094f6b7 100644
--- a/diff.c
+++ b/diff.c
@@ -3593,6 +3593,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_XDL_SET(options, IGNORE_WHITESPACE_CHANGE);
else if (!strcmp(arg, "--ignore-space-at-eol"))
DIFF_XDL_SET(options, IGNORE_WHITESPACE_AT_EOL);
+ else if (!strcmp(arg, "--ignore-blank-lines"))
+ DIFF_XDL_SET(options, IGNORE_BLANK_LINES);
else if (!strcmp(arg, "--patience"))
options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
else if (!strcmp(arg, "--histogram"))