Author: stsp
Date: Sun Jan  3 23:32:31 2010
New Revision: 895508

URL: http://svn.apache.org/viewvc?rev=895508&view=rev
Log:
Fix a bug in svn patch which prevented empty lines of context from matching.

* subversion/libsvn_client/patch.c
  (match_hunk): Some time ago, lines read from a hunk used to include
   the leading '-', ' ', or '+' character. But nowadays the diff-parser
   abstracts those away for us, so it's fine if a line read from a hunk
   has length zero.

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

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=895508&r1=895507&r2=895508&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Sun Jan  3 23:32:31 2010
@@ -449,7 +449,7 @@
                                              NULL, &hunk_eof, iterpool));
       SVN_ERR(svn_stream_readline(target->stream, &target_line, 
target->eol_str,
                                   &target->eof, iterpool));
-      if (! hunk_eof && hunk_line->len > 0)
+      if (! hunk_eof)
         {
           lines_matched = (hunk_line->len == target_line->len &&
                            ! strcmp(hunk_line->data, target_line->data));


Reply via email to