X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=git-gui%2Flib%2Fcommit.tcl;h=0d81432af53ba873d89421fa4767243818ab1f0a;hb=3d8bc74127bbb583bc437214a1d6c9afcf77646c;hp=372bed9948390483d66036231fce2fe8964d7bb6;hpb=9b0b0b4f45bc3d2f12391fe0dd4eaef81db97295;p=git.git diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index 372bed994..0d81432af 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -263,7 +263,9 @@ proc commit_commitmsg {curHEAD msg_p} { global is_detached repo_config global pch_error - if {$is_detached && $repo_config(gui.warndetachedcommit)} { + if {$is_detached + && ![file exists [gitdir rebase-merge head-name]] + && [is_config_true gui.warndetachedcommit]} { set msg [mc "You are about to commit on a detached head.\ This is a potentially dangerous thing to do because if you switch\ to another branch you will loose your changes and it can be difficult\