From: Eric Wong Date: Sat, 10 Jun 2006 06:27:01 +0000 (-0700) Subject: git-svn: eol_cp corner-case fixes X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=4a393f2b53f0997f79d47793d4c774fa0072887c;hp=4a393f2b53f0997f79d47793d4c774fa0072887c;p=git.git git-svn: eol_cp corner-case fixes If we read the maximum size of our buffer into $buf, and the last character is '\015', there's a chance that the character is '\012', which means our regex won't work correctly. At the worst case, this could introduce an extra newline into the code. We'll now read an extra character if we see '\015' is the last character in $buf. We also forgot to recalculate the length of $buf after doing the newline substitution, causing some files to appeare truncated. We'll do that now and force byte semantics in length() for good measure. Signed-off-by: Eric Wong ---