git-gui: Warn users before making an octopus merge
A coworker who was new to git-gui recently tried to make an octopus merge when he did not quite mean to. Unfortunately in his case the branches had file level conflicts and failed to merge with the octopus strategy, and he didn't quite know why this happened. Since most users really don't want to perform an octopus merge this additional safety valve in front of the merge process is a good thing. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Apr 28, 2007 at 21:26 UTC
1afd1ec1077a6d43b9492e19ea88f5928204d4cc
1 file changed
+13
git-gui.sh
+13
@@ -2886,6 +2886,19 @@ proc start_local_merge_action {w} {
2886
set unit branch
2887
} elseif {$revcnt <= 15} {
2888
set unit branches
2889
+
2890
+ if {[tk_dialog \
2891
+ $w.confirm_octopus \
2892
+ [wm title $w] \
2893
+ "Use octopus merge strategy?
2894
+
2895
+You are merging $revcnt branches at once. This requires using the octopus merge driver, which may not succeed if there are file-level conflicts.
2896
+" \
2897
+ question \
2898
+ 0 \
2899
+ {Cancel} \
2900
+ {Use octopus} \
2901
+ ] != 1} return
2902
} else {
2903
tk_messageBox \
2904
-icon error \