Fix diff index handling
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 28 Mar 2009 00:05:04 +0000 (01:05 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 28 Mar 2009 00:05:04 +0000 (01:05 +0100)
commitf7d6f1b76256c4002786fdecb6a3ef44fddf8282
treeaacd41516f4bdd849e75476c9c03185b5d1aea34
parent14a9771357ee12a52f8d3c8c466ca53306dd8e65
Fix diff index handling

Inserting text at index 0 (a0 N command, to prepend N lines) resulted in
text being appended since the diff index 0 was mapped to Ruby index -1.
The solution is to turn insertions into Array#unshift rather than
Array#<<, so that they can use the same index as the diff, and only
decrementing the diff index for deletions.
rcs-fast-export.rb