]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: rectify empty hint in call of require_clean_work_tree()
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Thu, 24 Aug 2023 15:00:46 +0000 (17:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Aug 2023 15:58:05 +0000 (08:58 -0700)
commita9b5955e07793ceadaad05315c1599226d01292f
treebef2851dcda8a16901e9d202b7b193090b8eadf0
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3
sequencer: rectify empty hint in call of require_clean_work_tree()

The canonical way to represent "no error hint" is making it NULL, which
shortcuts the error() call altogether. This fixes the output by removing
the line which said just "error:", which would appear when the worktree
is dirtied while editing the initial rebase todo file. This was
introduced by 97e1873 (rebase -i: rewrite complete_action() in C,
2018-08-28), which did a somewhat inaccurate conversion from shell.

To avoid that such bugs re-appear, test for the condition in
require_clean_work_tree().

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
wt-status.c