From: Pratyush Yadav Date: Sun, 25 Aug 2019 22:53:13 +0000 (+0530) Subject: git-gui: return early when patch fails to apply X-Git-Tag: v2.24.0-rc0~139^2~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ccdfb1c78e1695c4df714887b73ab417ca60f22;p=thirdparty%2Fgit.git git-gui: return early when patch fails to apply In the procedure apply_or_revert_range_or_line, if the patch does not apply successfully, a dialog is shown, but execution proceeds after that. Instead, return early on error so the parts that come after this don't work on top of an error state. Signed-off-by: Pratyush Yadav --- diff --git a/lib/diff.tcl b/lib/diff.tcl index ffca7880e1..0659029632 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -848,6 +848,8 @@ proc apply_or_revert_range_or_line {x y revert} { puts -nonewline $p $wholepatch close $p} err]} { error_popup "$failed_msg\n\n$err" + unlock_index + return } unlock_index