} elseif {[load_message MERGE_MSG]} {
} elseif {[load_message SQUASH_MSG]} {
}
- $ui_comm edit modified false
$ui_comm edit reset
+ $ui_comm edit modified false
}
if {$repo_config(gui.trustmtime) eq {true}} {
$ui_comm delete 0.0 end
$ui_comm insert end $msg
- $ui_comm edit modified false
$ui_comm edit reset
+ $ui_comm edit modified false
rescan {set ui_status_value {Ready.}}
}
set commit_type normal
$ui_comm delete 0.0 end
- $ui_comm edit modified false
$ui_comm edit reset
+ $ui_comm edit modified false
rescan {set ui_status_value {Ready.}}
}
}
$ui_comm delete 0.0 end
- $ui_comm edit modified false
$ui_comm edit reset
+ $ui_comm edit modified false
if {$single_commit} do_quit
}
proc do_repack {} {
- set w [new_console "repack" "Repacking the object database"]
+ set w [new_console {repack} \
+ {Repacking the object database}]
set cmd [list git repack]
lappend cmd -a
lappend cmd -d
}
proc do_fsck_objects {} {
- set w [new_console "verify" "Verifying the object database"]
+ set w [new_console {fsck-objects} \
+ {Verifying the object database with fsck-objects}]
set cmd [list git fsck-objects]
lappend cmd --full
lappend cmd --cache
set is_quitting 0
proc do_quit {} {
- global gitdir ui_comm is_quitting repo_config
+ global gitdir ui_comm is_quitting repo_config commit_type
if {$is_quitting} return
set is_quitting 1
#
set save [file join $gitdir GITGUI_MSG]
set msg [string trim [$ui_comm get 0.0 end]]
- if {[$ui_comm edit modified] && $msg ne {}} {
+ if {![string match amend* $commit_type]
+ && [$ui_comm edit modified]
+ && $msg ne {}} {
catch {
set fd [open $save w]
puts $fd [string trim [$ui_comm get 0.0 end]]
close $fd
}
- } elseif {$msg eq {} && [file exists $save]} {
- file delete $save
+ } else {
+ catch {file delete $save}
}
# -- Stash our current window geometry into this repository.
# -- Menu Bar
#
menu .mbar -tearoff 0
-.mbar add cascade -label Project -menu .mbar.project
+.mbar add cascade -label Repository -menu .mbar.repository
.mbar add cascade -label Edit -menu .mbar.edit
.mbar add cascade -label Commit -menu .mbar.commit
if {!$single_commit} {
}
. configure -menu .mbar
-# -- Project Menu
+# -- Repository Menu
#
-menu .mbar.project
-.mbar.project add command -label Visualize \
+menu .mbar.repository
+.mbar.repository add command -label Visualize \
-command do_gitk \
-font font_ui
if {!$single_commit} {
- .mbar.project add command -label {Repack Database} \
+ .mbar.repository add separator
+
+ .mbar.repository add command -label {Repack Database} \
-command do_repack \
-font font_ui
- .mbar.project add command -label {Verify Database} \
+ .mbar.repository add command -label {Verify Database} \
-command do_fsck_objects \
-font font_ui
+ .mbar.repository add separator
+
if {$tcl_platform(platform) eq {windows}} {
- .mbar.project add command \
+ .mbar.repository add command \
-label {Create Desktop Icon} \
-command do_windows_shortcut \
-font font_ui
} elseif {[is_MacOSX]} {
- .mbar.project add command \
+ .mbar.repository add command \
-label {Create Desktop Icon} \
-command do_macosx_app \
-font font_ui
}
}
-.mbar.project add command -label Quit \
+.mbar.repository add command -label Quit \
-command do_quit \
-accelerator $M1T-Q \
-font font_ui
lappend disable_on_lock \
[list .mbar.commit entryconf [.mbar.commit index last] -state]
-.mbar.commit add command -label {Include All} \
+.mbar.commit add command -label {Include All In Commit} \
-command do_include_all \
-accelerator $M1T-I \
-font font_ui