diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-09-25 08:41:07 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-25 08:41:07 -0700 |
commit | 1500f7bc1366e71edb7e8a31f3cf5614e9591cc2 (patch) | |
tree | 350805ff81d52e8c3a0eb0c8d71ae78662969664 /git-gui/lib/commit.tcl | |
parent | c9c6cc8d7db312b9e8502f8d55422b8309cde2f3 (diff) | |
parent | 3e34838caf796e67c057a136d1fdfe1d4286a003 (diff) | |
download | git-1500f7bc1366e71edb7e8a31f3cf5614e9591cc2.tar.gz |
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: Reenable staging unmerged files by clicking the icon.
git-gui: Support the encoding menu in gui blame.
git-gui: Optimize encoding name resolution using a lookup table.
git-gui: Allow forcing display encoding for diffs using a submenu.
git-gui: Add a menu of available encodings.
git-gui: Cleanup handling of the default encoding.
git-gui: Assume `blame --incremental` output is in UTF-8
git-gui: Use gitattribute "encoding" for file content display
git-gui: Add support for calling out to the prepare-commit-msg hook
git-gui: Hide commit related UI during citool --nocommit
git-gui: Add more integration options to citool.
git-gui: Updated German translation.
git-gui: I18n fix sentence parts into full sentences for translation again.
git-gui: Restore ability to Stage Working Copy for conflicts.
git-gui: Fix Blame Parent & Context for working copy lines.
Diffstat (limited to 'git-gui/lib/commit.tcl')
-rw-r--r-- | git-gui/lib/commit.tcl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index 2977315624..334514996a 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -168,7 +168,7 @@ File %s cannot be committed by this program. } } } - if {!$files_ready && ![string match *merge $curType]} { + if {!$files_ready && ![string match *merge $curType] && ![is_enabled nocommit]} { info_popup [mc "No changes to commit. You must stage at least 1 file before you can commit. @@ -177,6 +177,8 @@ You must stage at least 1 file before you can commit. return } + if {[is_enabled nocommitmsg]} { do_quit 0 } + # -- A message is required. # set msg [string trim [$ui_comm get 1.0 end]] @@ -212,6 +214,8 @@ A good commit message has the following format: puts $msg_wt $msg close $msg_wt + if {[is_enabled nocommit]} { do_quit 0 } + # -- Run the pre-commit hook. # set fd_ph [githook_read pre-commit] @@ -410,7 +414,7 @@ A rescan will be automatically started now. set ::GITGUI_BCK_exists 0 } - if {[is_enabled singlecommit]} do_quit + if {[is_enabled singlecommit]} { do_quit 0 } # -- Update in memory status # |