Shouldn't this new test come after the existing optimization, whichĪllows us to leave without loading the blob contents (which is > * same and don't even have to load the blobs. > * If we have an unmodified pair, we know that the count will be the > + (!textconv_two & diff_filespec_is_binary(o->repo, p->two)))) > + ((!textconv_one & diff_filespec_is_binary(o->repo, p->one)) || > + if ((o->pickaxe_opts & DIFF_PICKAXE_KIND_G) & > textconv_two = get_textconv(o->repo->index, p->two) > -144,6 +144,11 static int pickaxe_match(struct diff_filepair *p, struct diff_options *o, > diff -git a/diffcore-pickaxe.c b/diffcore-pickaxe.c Binary files without textconv filter are ignored. > implementation runs diff twice and greps, and this can be quite > rename-detection considers the same file) moves, which is noise. This means that it will detect in-file (or what > -242,7 +242,7 textual diff has an added or a deleted line that matches the given > diff -git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt > 3 files changed, 28 insertions(+), 1 deletion(-) > we need to ignore binary files when searching with -G as well. > The concept of differences only makes sense for text files, therefore > contains added/removed lines that match regex. > The -G option of log looks for the differences whose patch text ` (2 subsequent siblings) 4 siblings, 1 reply 30+ messages in threadįrom: Junio C Hamano 1:29 UTC ( / raw) 20:52 ` log -S: Add test which searches in " Thomas 1:29 ` Junio C Hamano : This is the (possibly missing) cover letter. 9:14 ` Ævar Arnfjörð Bjarmason 2 siblings, 2 replies 30+ messages in thread 1:34 ` log -S: Add test which searches in " Junio C Hamano 20:52 ` log -S: Add test which searches in " Thomas 21:00 ` Thomas Braun +test_expect_success 'log -S looks into binary files' ' +++ -128,4 +128,15 test_expect_success 'log -G looks into binary files with textconv filter' ' addition/deletion)Īdd a test to ensure that we keep looking into binary files with -SĪs changing that would break backwards compatibility in unexpected ways. Number of occurrences of the specified string (i.e. The -S option of log looks for differences that changes the ` (3 subsequent siblings) 4 siblings, 3 replies 30+ messages in thread 21:00 ` Teach log -G to ignore " Thomas Braun 20:52 ` log -G: Ignore " Thomas 20:52 ` Thomas Braun * log -S: Add test which searches in binary files ^ raw reply related 30+ messages in thread +test_expect_success 'log -G looks into binary files with textconv filter' ' +test_expect_success 'log -G ignores binary files' ' +++ -106,4 +106,26 test_expect_success 'log -S -no-textconv (missing textconv tool)' ' Unless textconv is inĭiff -git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh * same and don't even have to load the blobs. * If we have an unmodified pair, we know that the count will be the + (!textconv_two & diff_filespec_is_binary(o->repo, p->two)))) + ((!textconv_one & diff_filespec_is_binary(o->repo, p->one)) || + if ((o->pickaxe_opts & DIFF_PICKAXE_KIND_G) & Textconv_two = get_textconv(o->repo->index, p->two) +++ -144,6 +144,11 static int pickaxe_match(struct diff_filepair *p, struct diff_options *o, Whenĭiff -git a/diffcore-pickaxe.c b/diffcore-pickaxe.c That match their respective criterion are kept in the output. When `-S` or `-G` are used without `-pickaxe-all`, only filepairs Implementation runs diff twice and greps, and this can be quite Rename-detection considers the same file) moves, which is noise. +++ -242,7 +242,7 textual diff has an added or a deleted line that matches the given We need to ignore binary files when searching with -G as well. The concept of differences only makes sense for text files, therefore The -G option of log looks for the differences whose patch textĬontains added/removed lines that match regex. ` (4 more replies) 0 siblings, 5 replies 30+ messages in thread 20:52 ` log -S: Add test which searches in " Thomas Braun 20:52 Teach log -G to ignore binary files Thomas 20:52 ` Thomas Braun Log -S: Add test which searches in binary files log -S keeps its behaviour but got a test to ensure that. 20:52 ` log -G: Ignore " Thomas BraunĠ siblings, 1 reply 30+ messages in threadīased on the previous discussion in I've prepared patches which teach Teach log -G to ignore binary files archive mirror help / color / mirror / Atom feed * Teach log -G to ignore binary files 20:52 Thomas Braun
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |