Fixed bug when binary file changed in RCS.
authorBen Martin <bmartin@mathworks.com>
Mon, 21 Jun 2010 14:13:17 +0000 (10:13 -0400)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 22 Jun 2010 10:47:01 +0000 (12:47 +0200)
commit236fcd05e0c0aa31111297929dbe996d07625f28
tree36e75ef7a59ab3e3d79179ef8ed68dd67b602f97
parent5440e757bcf784bce0bd130ef2608caa41107c38
Fixed bug when binary file changed in RCS.

If the RCS file being tracked is missing a final new-line character, the
program would crash whenever the last line was deleted and then added.

Reproduction steps:

mkdir /tmp/bug_demo && cd /tmp/bug_demo
rcs -i foo.txt
echo -n "foo" > foo.txt
ci foo.txt
co -l foo.txt
echo -n "d" >> foo.txt
ci foo.txt
git init
~/bin/rcs-fast-export.rb foo.txt,v
rcs-fast-export.rb