Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-gui: return early when patch fails to apply
author
Pratyush Yadav
<me@yadavpratyush.com>
Sun, 25 Aug 2019 22:53:13 +0000
(
04:23
+0530)
committer
Pratyush Yadav
<me@yadavpratyush.com>
Sun, 25 Aug 2019 22:53:13 +0000
(
04:23
+0530)
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>
lib/diff.tcl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(from parent 1:
62bd999
)
diff --git
a/lib/diff.tcl
b/lib/diff.tcl
index ffca7880e184577ff5a16334f453cc70f9fe0c8b..0659029632a000c4454c834cf9c579d85536b432 100644
(file)
--- 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