git-gui: fix hunk parsing for corner case changes
commit2110ba328e474e6882a6a4c2298f731fef336e40
authorBert Wesarg <bert.wesarg@googlemail.com>
Mon, 9 Jan 2012 13:22:54 +0000 (9 14:22 +0100)
committerBert Wesarg <bert.wesarg@googlemail.com>
Fri, 2 May 2014 13:05:47 +0000 (2 15:05 +0200)
tree55b1557a37c4ce696052199c3532c0866993285f
parent5d15482de021dc8ff05a95cc9cadd958a2d1e615
git-gui: fix hunk parsing for corner case changes

The simple hunk parsing code did not recognize hunks when where there is no
second number after the comma. Like in these cases:

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

Which resulted in this hunk header:

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

Or:

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

Resulted in:

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

While trying to stage only the '-1' line.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
lib/diff.tcl