git-gui: Don't kill modified commit message buffer with merge templates
[gitweb.git] / git-gui.sh
index a38293a347d12bf717c0e02638e465d9efc06c4c..f87b955fdb98bdd0591c9c02c52075e245cc2e19 100755 (executable)
@@ -829,8 +829,9 @@ proc rescan {after {honor_trustmtime 1}} {
 
        array unset file_states
 
-       if {![$ui_comm edit modified]
-               || [string trim [$ui_comm get 0.0 end]] eq {}} {
+       if {!$::GITGUI_BCK_exists &&
+               (![$ui_comm edit modified]
+               || [string trim [$ui_comm get 0.0 end]] eq {})} {
                if {[string match amend* $commit_type]} {
                } elseif {[load_message GITGUI_MSG]} {
                } elseif {[load_message MERGE_MSG]} {