diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-16 03:01:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-16 03:01:44 -0700 |
commit | 47d45a5ebd5bce543a50546d05e8b92c6971acda (patch) | |
tree | 9b386fabbcb80dd7993e94a3c189ed21b9b03147 /git-gui/lib/commit.tcl | |
parent | git-svn: Allow certain refs to be ignored (diff) | |
parent | git-gui: incremental goto line in blame view (diff) | |
download | tgif-47d45a5ebd5bce543a50546d05e8b92c6971acda.tar.xz |
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: incremental goto line in blame view
git-gui: clear the goto line input when hiding
git-gui: only accept numbers in the goto-line input
git-gui: search and linenumber input are mutual exclusive in the blame view
git-gui: deal with unknown files when pressing the "Stage Changed" button
git-gui: drop the 'n' and 'Shift-n' bindings from the last patch.
git-gui: Add keyboard shortcuts for search and goto commands in blame view.
git-gui: Enable jumping to a specific line number in blame view.
Fix tooltip display with multiple monitors on windows.
Fix typo: existant->existent
git-gui: updated translator README for current procedures.
git-gui: warn when trying to commit on a detached head
git-gui: Corrected a typo in the Swedish translation of 'Continue'
Diffstat (limited to 'git-gui/lib/commit.tcl')
-rw-r--r-- | git-gui/lib/commit.tcl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index 5ce46877bf..372bed9948 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -260,8 +260,23 @@ proc commit_prehook_wait {fd_ph curHEAD msg_p} { } proc commit_commitmsg {curHEAD msg_p} { + global is_detached repo_config global pch_error + if {$is_detached && $repo_config(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\ +to retrieve them later from the reflog. You should probably cancel this\ +commit and create a new branch to continue.\n\ +\n\ +Do you really want to proceed with your Commit?"] + if {[ask_popup $msg] ne yes} { + unlock_index + return + } + } + # -- Run the commit-msg hook. # set fd_ph [githook_read commit-msg $msg_p] |