subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevek...@apache.org
Subject svn commit: r1374800 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c
Date Sun, 19 Aug 2012 17:24:30 GMT
Author: steveking
Date: Sun Aug 19 17:24:30 2012
New Revision: 1374800

URL: http://svn.apache.org/viewvc?rev=1374800&view=rev
Log:
Fix an issue with added files in git patches.

* subversion/libsvn_diff/parse-diff.c
  (svn_diff_parse_next_patch): skip the line length check and allow the
  patch line to be of equal length as the expected input as well.

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=1374800&r1=1374799&r2=1374800&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Sun Aug 19 17:24:30 2012
@@ -1284,8 +1284,7 @@ svn_diff_parse_next_patch(svn_patch_t **
       /* Run the state machine. */
       for (i = 0; i < (sizeof(transitions) / sizeof(transitions[0])); i++)
         {
-          if (line->len > strlen(transitions[i].expected_input)
-              && starts_with(line->data, transitions[i].expected_input)
+          if (starts_with(line->data, transitions[i].expected_input)
               && state == transitions[i].required_state)
             {
               SVN_ERR(transitions[i].fn(&state, line->data, *patch,



Mime
View raw message