-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File moves are ignored by filterdiff #22
Comments
I'm pretty sure the cause is https://github.com/twaugh/patchutils/blob/master/src/filterdiff.c#L1070-L1073. |
can you post the diff file or a kind of sample please ? |
More specifically, with this diff: diff --git a/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order.html b/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order-new.html
similarity index 100%
rename from tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order.html
rename to tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order-new.html
diff --git a/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.scale.large.html b/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.scale.large.html
deleted file mode 100644
index 926530d1f7e6..000000000000
--- a/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.scale.large.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
-<title>Canvas test: 2d.transformation.scale.large</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/common/canvas-tests.js"></script>
-<link rel="stylesheet" href="/common/canvas-tests.css">
-<body class="show_output">
-
-<h1>2d.transformation.scale.large</h1>
-<p class="desc">scale() with large scale factors works</p>
-
-<p class="notes">Not really that large at all, but it hits the limits in Firefox.
-<p class="output">Actual output:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-var t = async_test("scale() with large scale factors works");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(1e5, 1e5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 1, 1);
-_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
-
-
-});
-</script>
- |
filterdiff collects the first five lines, so there are two |
filterdiff [[-i PATTERN] | [--include=PATTERN]] [[-I FILE] | [--include-from-file=FILE]] [[-p n] what you want with -p -i ? is a syntax error filterdiff: option requires an argument -- 'p'
|
Sorry, I meant |
If I use |
I don't understood the problem , is the -i ? |
The problem is that the diff contains a change to a file ( |
+++ /dev/null as I understand -i just includes files in diff that match if you just have the delete file , what you except ? |
I posted the complete example in #22 (comment). When I filter that diff using |
I think you expect something that filterdiff does not do , what you are asking to just show the diffs where file name have "tests/wpt/web-platform-tests" |
Why is that not the expected behaviour of filterdiff? |
you need your git diff not detect similarity and don't try detect renamed files and show the complete patch |
My question is why filterdiff should not be modified to accommodate this diff? |
man filterdiff - extract or exclude diffs from a diff file |
I think "diff" is generally used to describe more than just the |
I just encountered the same problem. @jdm Did you manage to find a workaround for this? |
I no longer remember any of the context for this problem. |
I see, we may try not exclude removes and files permissions as mention in #59 |
Another test case: when running $ curl -L -s https://github.com/orbitalquark/scintillua/commit/c6c98d68ecc0.patch \
|filterdiff --include="lexers/*.lua" -p1
|
If anyone is running
https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec |
A diff like:
diff --git a/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order.html b/tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order-new.html similarity index 100% rename from tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order.html rename to tests/wpt/web-platform-tests/2dcontext/transformations/2d.transformation.order-new.html
gets excluded when I run
filterdiff -p 1 -i tests/wpt/web-platform-tests
.The text was updated successfully, but these errors were encountered: