subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1619476 - /subversion/trunk/subversion/libsvn_client/diff.c
Date Thu, 21 Aug 2014 16:27:28 GMT
Author: julianfoad
Date: Thu Aug 21 16:27:28 2014
New Revision: 1619476

URL: http://svn.apache.org/r1619476
Log:
Fix missing diff header lines when diffing a file that has only property
changes.

* subversion/libsvn_client/diff.c
  (diff_content_changed): If the text diff was empty, assume no header was
    printed (unless we printed one explicitly).

Modified:
    subversion/trunk/subversion/libsvn_client/diff.c

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1619476&r1=1619475&r2=1619476&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Aug 21 16:27:28 2014
@@ -853,8 +853,9 @@ diff_content_changed(svn_boolean_t *wrot
                                    NULL, NULL, scratch_pool));
         }
 
-      /* We have a printed a diff for this path, mark it as visited. */
-      *wrote_header = TRUE;
+      /* If we have printed a diff for this path, mark it as visited. */
+      if (exitcode == 1)
+        *wrote_header = TRUE;
     }
   else   /* use libsvn_diff to generate the diff  */
     {
@@ -911,8 +912,9 @@ diff_content_changed(svn_boolean_t *wrot
                      dwi->cancel_func, dwi->cancel_baton,
                      scratch_pool));
 
-          /* We have a printed a diff for this path, mark it as visited. */
-          *wrote_header = TRUE;
+          /* If we have printed a diff for this path, mark it as visited. */
+          if (dwi->use_git_diff_format || svn_diff_contains_diffs(diff))
+            *wrote_header = TRUE;
         }
     }
 



Mime
View raw message