mirror of
https://github.com/git/git.git
synced 2024-10-29 21:37:53 +01:00
git-gui: Optionally save commit buffer on exit.
If the commit area does not exist, don't save the commit message to a file, or the window geometry. The reason I'm doing this is I want to make the main window entirely optional, such as if the user has asked us to show a blame from the command line. In such cases the commit area won't exist and trying to get its text would cause an error. If we are running without the commit message area, we cannot save our window geometry either, as the root window '.' won't be a normal commit window. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
64a906f861
commit
db7f34d4c5
1 changed files with 28 additions and 26 deletions
|
@ -4126,6 +4126,7 @@ proc do_quit {} {
|
|||
if {$is_quitting} return
|
||||
set is_quitting 1
|
||||
|
||||
if {[winfo exists $ui_comm]} {
|
||||
# -- Stash our current commit buffer.
|
||||
#
|
||||
set save [gitdir GITGUI_MSG]
|
||||
|
@ -4155,6 +4156,7 @@ proc do_quit {} {
|
|||
if {$cfg_geometry ne $rc_geometry} {
|
||||
catch {exec git repo-config gui.geometry $cfg_geometry}
|
||||
}
|
||||
}
|
||||
|
||||
destroy .
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue