summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-gui.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index c4ab824b9d..0f98d2ccea 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1696,6 +1696,16 @@ proc do_create_branch_action {w} {
global create_branch_head create_branch_trackinghead
set newbranch [string trim [$w.desc.name_t get 0.0 end]]
+ if {$newbranch eq {}} {
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title [wm title $w] \
+ -parent $w \
+ -message "Please supply a branch name."
+ focus $w.desc.name_t
+ return
+ }
if {![catch {exec git show-ref --verify -- "refs/heads/$newbranch"}]} {
tk_messageBox \
-icon error \