subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1139305 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c
Date Fri, 24 Jun 2011 13:44:33 GMT
Author: julianfoad
Date: Fri Jun 24 13:44:33 2011
New Revision: 1139305

URL: http://svn.apache.org/viewvc?rev=1139305&view=rev
Log:
* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Add some comments.

Modified:
    subversion/trunk/subversion/libsvn_diff/parse-diff.c

Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=1139305&r1=1139304&r2=1139305&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Fri Jun 24 13:44:33 2011
@@ -657,11 +657,14 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
             }
 
           c = line->data[0];
-          /* Tolerate chopped leading spaces on empty lines. */
           if (original_lines > 0 && modified_lines > 0 &&
-              ((c == ' ') || (! eof && line->len == 0) ||
-               (ignore_whitespace && c != del && c != add)))
+              ((c == ' ')
+               /* Tolerate chopped leading spaces on empty lines. */
+               || (! eof && line->len == 0)
+               /* Maybe tolerate chopped leading spaces on non-empty lines. */
+               || (ignore_whitespace && c != del && c != add)))
             {
+              /* It's a "context" line in the hunk. */
               hunk_seen = TRUE;
               original_lines--;
               modified_lines--;
@@ -672,6 +675,7 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
             }
           else if (original_lines > 0 && c == del)
             {
+              /* It's a "deleted" line in the hunk. */
               hunk_seen = TRUE;
               changed_line_seen = TRUE;
 
@@ -684,6 +688,7 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
             }
           else if (modified_lines > 0 && c == add)
             {
+              /* It's an "added" line in the hunk. */
               hunk_seen = TRUE;
               changed_line_seen = TRUE;
 



Mime
View raw message