Commits

Anonymous committed 1afd1ec

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>

Comments (0)

Files changed (1)

 		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 \