Fix corrupt chunk header during staging
commitc0d8194b9c7d2512a4c0f0d9da24575eec77058b
authorJonas Fonseca <jonas.fonseca@gmail.com>
Mon, 8 Jun 2015 01:13:21 +0000 (7 21:13 -0400)
committerJonas Fonseca <jonas.fonseca@gmail.com>
Mon, 8 Jun 2015 02:52:30 +0000 (7 22:52 -0400)
tree2b5a56390f57b33d7e6869cb371c07067ade895e
parentc90f8c31737af9f75014e48c0b2e73e779aad23d
Fix corrupt chunk header during staging

When staging a chunk with the following header:

    @@ -1 +1,2 @@

It was assumed to be:

    @@ -1,0 +1,2 @@

But should in fact be regarded as:

    @@ -1,1 +1,2 @@

This was discovered by a test case reported in GitHub issue #410.

Fixes #410
src/parse.c
test/stage/gh-410-test [new file with mode: 0755]