summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-04-29 01:26:27 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-05-02 17:06:09 (GMT)
commit1afd1ec1077a6d43b9492e19ea88f5928204d4cc (patch)
tree4029b85b39a8365d932d9c2ab2cb1e5984ca64cb /git-gui.sh
parent2f1a955b99954fd18c512244e1321dc4cff856b4 (diff)
downloadgit-1afd1ec1077a6d43b9492e19ea88f5928204d4cc.zip
git-1afd1ec1077a6d43b9492e19ea88f5928204d4cc.tar.gz
git-1afd1ec1077a6d43b9492e19ea88f5928204d4cc.tar.bz2
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>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index f6c6d44..dd8a408 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2886,6 +2886,19 @@ proc start_local_merge_action {w} {
set unit branch
} elseif {$revcnt <= 15} {
set unit branches
+
+ if {[tk_dialog \
+ $w.confirm_octopus \
+ [wm title $w] \
+ "Use octopus merge strategy?
+
+You are merging $revcnt branches at once. This requires using the octopus merge driver, which may not succeed if there are file-level conflicts.
+" \
+ question \
+ 0 \
+ {Cancel} \
+ {Use octopus} \
+ ] != 1} return
} else {
tk_messageBox \
-icon error \