* 'master' of https://github.com/prati0100/git-gui:
  git-gui: add hotkey to toggle "Amend Last Commit"
  git-gui: add horizontal scrollbar to commit buffer
  git-gui: convert new/amend commit radiobutton to checkbutton
  git-gui: add hotkeys to set widget focus
  git-gui: allow undoing last revert
  git-gui: return early when patch fails to apply
  git-gui: allow reverting selected hunk
  git-gui: allow reverting selected lines
This commit is contained in:
Junio C Hamano
2019-09-18 11:22:11 -07:00
5 changed files with 199 additions and 55 deletions

View 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
}
}
}