]> git.ipfire.org Git - thirdparty/git.git/commit
commit: unify logic to avoid multiple scissors lines when merging
authorJosh Triplett <josh@joshtriplett.org>
Tue, 27 Feb 2024 09:17:36 +0000 (01:17 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Feb 2024 17:40:47 +0000 (09:40 -0800)
commite90cc075cc43f2bf08a8963ae84d3e4da50ebfc3
treec63cf0c9d22cc0f2ae3b4e1845a78ffd162036b0
parent688a0a751e9ee032be9fb70d7d63220bc85acae1
commit: unify logic to avoid multiple scissors lines when merging

prepare_to_commit has some logic to figure out whether merge already
added a scissors line, and therefore it shouldn't add another. Now that
wt_status_add_cut_line has built-in state for whether it has
already added a previous line, just set that state instead, and then
remove that condition from subsequent calls to wt_status_add_cut_line.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c