Go to file
Johannes Schindelin 6d02c1e204 git gui: fix staging a second line to a 1-line file
When a 1-line file is augmented by a second line, and the user tries to
stage that single line via the "Stage Line" context menu item, we do not
want to see "apply: corrupt patch at line 5".

The reason for this error was that the hunk header looks like this:

	@@ -1 +1,2 @@

but the existing code expects the original range always to contain a
comma. This problem is easily fixed by cutting the string "1 +1,2"
(that Git GUI formerly mistook for the starting line) at the space.

This fixes https://github.com/git-for-windows/git/issues/515

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
lib git gui: fix staging a second line to a 1-line file 2018-01-09 11:02:40 -08:00
macosx git-gui: Make git-gui lib dir configurable at runime 2014-08-10 12:48:28 +01:00
po git-gui i18n: Updated Bulgarian translation (565,0f,0u) 2016-10-20 11:12:50 +01:00
windows git-gui: chmod +x po2msg, windows/git-gui.sh 2014-01-18 17:06:41 +00:00
.gitattributes git-gui: set whitespace warnings appropriate to this project 2011-11-30 11:35:28 +00:00
.gitignore git-gui: Honor a config.mak in git-gui's top level 2007-10-13 22:14:14 -04:00
GIT-VERSION-GEN git-gui: set version 0.21 2016-10-20 11:19:43 +01:00
Makefile git-gui: sort entries in tclIndex 2015-05-01 15:53:06 +01:00
git-gui--askpass git-gui: ensure correct application termination in git-gui--askpass 2010-08-18 23:19:24 +01:00
git-gui.sh git-gui: handle the encoding of Git's output correctly 2016-10-06 09:23:21 +01:00