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 <me@yadavpratyush.com>
Pratyush Yadav committed
Aug 26, 2019 at 04:23 UTC
2ccdfb1c78e1695c4df714887b73ab417ca60f22
1 file changed
+2
lib/diff.tcl
+2
@@ -848,6 +848,8 @@ proc apply_or_revert_range_or_line {x y revert} {
848
puts -nonewline $p $wholepatch
849
close $p} err]} {
850
error_popup "$failed_msg\n\n$err"
851
+ unlock_index
852
+ return
853
}
854
855
unlock_index