You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/08/19 19:24:30 UTC

svn commit: r1374800 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c

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,