diff options
| -rwxr-xr-x | git-gui.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh index 867b8cea46..8ee67e6f09 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2305,11 +2305,10 @@ proc do_quit {{rc {1}}} { if {$GITGUI_BCK_exists && ![$ui_comm edit modified]} { file rename -force [gitdir GITGUI_BCK] $save set GITGUI_BCK_exists 0 - } else { + } elseif {[$ui_comm edit modified]} { set msg [string trim [$ui_comm get 0.0 end]] regsub -all -line {[ \r\t]+$} $msg {} msg - if {(![string match amend* $commit_type] - || [$ui_comm edit modified]) + if {![string match amend* $commit_type] && $msg ne {}} { catch { set fd [open $save w] |
