1
0
mirror of https://github.com/git/git.git synced 2024-11-19 08:25:21 +01:00
git/lib
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
..
about.tcl
blame.tcl
branch_checkout.tcl
branch_create.tcl
branch_delete.tcl
branch_rename.tcl
branch.tcl
browser.tcl
checkout_op.tcl
choose_font.tcl
choose_repository.tcl
choose_rev.tcl
class.tcl
commit.tcl
console.tcl
database.tcl
date.tcl
diff.tcl
encoding.tcl
error.tcl
git-gui.ico
index.tcl
line.tcl
logo.tcl
merge.tcl
mergetool.tcl
option.tcl
remote_add.tcl
remote_branch_delete.tcl
remote.tcl
search.tcl
shortcut.tcl
spellcheck.tcl
sshkey.tcl
status_bar.tcl
themed.tcl
tools_dlg.tcl
tools.tcl
transport.tcl
win32_shortcut.js
win32.tcl