OSDN Git Service

git-gui: Simplify error case for unsupported merge types
authorShawn O. Pearce <spearce@spearce.org>
Fri, 20 Jul 2007 07:37:43 +0000 (03:37 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 21 Jul 2007 09:00:37 +0000 (05:00 -0400)
If we are given a merge type we don't understand in checkout_op there
is probably a bug in git-gui somewhere that allowed this unknown merge
strategy to come into this part of the code path.  We currently only
recognize three merge types ('none', 'ff' and 'reset') but are going
to be supporting more in the future.  Rather than keep editing this
message I'm going with a very generic "Uh, we don't do that!" type of
error.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/checkout_op.tcl

index 6d87830..554c107 100644 (file)
@@ -208,7 +208,7 @@ method _update_ref {} {
                                }
                        }
                        default {
-                               _error $this "Only 'ff' and 'reset' merge is currently supported."
+                               _error $this "Merge strategy '$merge_type' not supported."
                                return 0
                        }
                        }