summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-26 04:11:10 -0500
committerShawn O. Pearce <spearce@spearce.org>2007-01-26 04:11:10 -0500
commit5f39dbf64f5e57c6ab7b20ba8c397df1074bc30c (patch)
tree0367b8088e70f16dc198d8fecbd8f6ad801ef6f7
parentdff7e88febf85b1b8b1b789cd7c99434b70fb19b (diff)
downloadgit-5f39dbf64f5e57c6ab7b20ba8c397df1074bc30c.tar.xz
git-gui: Don't allow merges in the middle of other things.
If the user is in the middle of a commit they have files which are modified. These may conflict with any merge that they may want to perform, which would cause problems if the user wants to abort a bad merge as we wouldn't have a checkpoint to roll back onto. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 31ef0e60ac..ae883f90bd 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2629,6 +2629,9 @@ The rescan will be automatically started now.
foreach path [array names file_states] {
switch -glob -- [lindex $file_states($path) 0] {
+ _O {
+ continue; # and pray it works!
+ }
U? {
error_popup "You are in the middle of a conflicted merge.
@@ -2641,6 +2644,18 @@ begin another merge.
unlock_index
return 0
}
+ ?? {
+ error_popup "You are in the middle of a change.
+
+File [short_path $path] is modified.
+
+You should complete the current commit before
+starting a merge. Doing so will help you abort
+a failed merge, should the need arise.
+"
+ unlock_index
+ return 0
+ }
}
}