general improvements
[gitweb.git] / git-gui / lib / index.tcl
index b588db11d9fc46b6c4c33274c3c5f969dfe43e5e..e07b7a376230f50a66f2450255121798409667f8 100644 (file)
@@ -466,19 +466,19 @@ proc do_revert_selection {} {
 }
 
 proc do_select_commit_type {} {
-       global commit_type selected_commit_type
+       global commit_type commit_type_is_amend
 
-       if {$selected_commit_type eq {new}
+       if {$commit_type_is_amend == 0
                && [string match amend* $commit_type]} {
                create_new_commit
-       } elseif {$selected_commit_type eq {amend}
+       } elseif {$commit_type_is_amend == 1
                && ![string match amend* $commit_type]} {
                load_last_commit
 
                # The amend request was rejected...
                #
                if {![string match amend* $commit_type]} {
-                       set selected_commit_type new
+                       set commit_type_is_amend 0
                }
        }
 }