diff options
author | Simon Ruderich <simon@ruderich.org> | 2013-04-05 15:16:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-05 10:30:44 -0700 |
commit | a8f6109428b868611c0a59e6894e2b6b38c34e1b (patch) | |
tree | 92266b799433bab33552abb6e621c2a883ddfb6a /diffcore-pickaxe.c | |
parent | 7cdb9b42c359000b1d3d604f847598afd015b7c7 (diff) | |
download | git-a8f6109428b868611c0a59e6894e2b6b38c34e1b.tar.gz |
diffcore-pickaxe: respect --no-textconv
git log -S doesn't respect --no-textconv:
$ echo '*.txt diff=wrong' > .gitattributes
$ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo
error: cannot run xxx: No such file or directory
fatal: unable to read files to diff
Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-pickaxe.c')
-rw-r--r-- | diffcore-pickaxe.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index 3124f49dc3..26ddf00aa3 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -86,8 +86,10 @@ static int diff_grep(struct diff_filepair *p, struct diff_options *o, if (diff_unmodified_pair(p)) return 0; - textconv_one = get_textconv(p->one); - textconv_two = get_textconv(p->two); + if (DIFF_OPT_TST(o, ALLOW_TEXTCONV)) { + textconv_one = get_textconv(p->one); + textconv_two = get_textconv(p->two); + } mf1.size = fill_textconv(textconv_one, p->one, &mf1.ptr); mf2.size = fill_textconv(textconv_two, p->two, &mf2.ptr); @@ -201,8 +203,10 @@ static int has_changes(struct diff_filepair *p, struct diff_options *o, if (!o->pickaxe[0]) return 0; - textconv_one = get_textconv(p->one); - textconv_two = get_textconv(p->two); + if (DIFF_OPT_TST(o, ALLOW_TEXTCONV)) { + textconv_one = get_textconv(p->one); + textconv_two = get_textconv(p->two); + } /* * If we have an unmodified pair, we know that the count will be the |