You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/11/22 02:12:45 UTC

svn commit: r1412401 - /subversion/trunk/subversion/libsvn_diff/diff_memory.c

Author: julianfoad
Date: Thu Nov 22 01:12:44 2012
New Revision: 1412401

URL: http://svn.apache.org/viewvc?rev=1412401&view=rev
Log:
Fix one of the two or three bugs in r1412382. This one caused diff-diff3-tests 2
to fail, and was basically the same bug that I only partly fixed in r1412397.

* subversion/libsvn_diff/diff_memory.c
  (svn_diff_mem_string_output_unified2): Correctly handle hunk_delimiter being NULL.

Modified:
    subversion/trunk/subversion/libsvn_diff/diff_memory.c

Modified: subversion/trunk/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_memory.c?rev=1412401&r1=1412400&r2=1412401&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_memory.c Thu Nov 22 01:12:44 2012
@@ -562,7 +562,7 @@ svn_diff_mem_string_output_unified2(svn_
       baton.hunk = svn_stringbuf_create_empty(pool);
       baton.hunk_delimiter = hunk_delimiter;
       baton.no_newline_string
-        = (hunk_delimiter != NULL && strcmp(hunk_delimiter, "##") != 0)
+        = (hunk_delimiter == NULL || strcmp(hunk_delimiter, "##") != 0)
           ? APR_EOL_STR SVN_DIFF__NO_NEWLINE_AT_END_OF_FILE APR_EOL_STR
           : APR_EOL_STR SVN_DIFF__NO_NEWLINE_AT_END_OF_PROPERTY APR_EOL_STR;