]> git.ipfire.org Git - thirdparty/git.git/commit
built-in add -p: coalesce hunks after splitting them
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 13 Dec 2019 08:07:59 +0000 (08:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2019 20:37:14 +0000 (12:37 -0800)
commit11f2c0dae8f8889b533455d700121d437f4be19f
treec0b3e13141205d2c1948fa1d1e5f988fa003fd10
parent510aeca199c4feeb38d318cc151ecf5464a3a865
built-in add -p: coalesce hunks after splitting them

This is considered "the right thing to do", according to 933e44d3a0
("add -p": work-around an old laziness that does not coalesce hunks,
2011-04-06).

Note: we cannot simply modify the hunks while merging them; Once we
implement hunk editing, we will call `reassemble_patch()` whenever a
hunk is edited, therefore we must not modify the hunks (because the user
might e.g. hit `K` and change their mind whether to stage the previous
hunk).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-patch.c