Skip to content
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

Tortoise diff example used for tests does not follow unified diff format #9

Open
stkent opened this issue May 24, 2016 · 0 comments
Open

Comments

@stkent
Copy link

stkent commented May 24, 2016

From this documentation, which seems to be the most official source on the unified diff format:

The lines common to both files begin with a space character.

The tortoise.diff file used for tests does not include this space character at the start of common lines. See for example the common empty line in this snippet:

Modified: trunk/test1.txt
===================================================================
--- /trunk/test1.txt    2013-10-23 19:41:56 UTC (rev 46)
+++ /trunk/test1.txt    2013-10-23 19:44:39 UTC (rev 47)
@@ -1,4 +1,5 @@
-test1
-test1
+aösdhasd
+asdasd

-test1
\ No newline at end of file
+sadsad
+asdasd
\ No newline at end of file

The svn.diff file correctly includes this space for all common lines.

So either:

  • Tortoise does follow unified diff format, and the example file lost space characters somehow; or
  • Tortoise does not follow unified diff format, in which case it is somewhat surprising that the UnifiedDiffParser implementation is currently parsing Tortoise diffs correctly.
stkent added a commit to stkent/githubdiffparser that referenced this issue May 25, 2016
The build configuration was generated by Gradle based on the original
pom.xml. Note that the current configuration is minimal and does not
include documentation or distribution tasks.

As part of this switch, the following changes were made:

  - source/target compatibility bumped to 1.8;
  - TestNG replaced by JUnit;
  - tortoise diff tests and resources removed, as it is unknown whether
    these diffs are produced in the correct unified format or not (see
    thombergs#9).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant