diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-31 19:35:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-31 19:35:37 -0400 |
commit | 041923a89ece8b1ed195cb7b528843c15770ea6f (patch) | |
tree | d85f7c488c05d8d6983ec1b65b2e427c59cc3acf /IkiWiki/Plugin | |
parent | e12627e0a4c73d4d47ac2f10750defe22b41580e (diff) | |
parent | 861dea7f1c720ff889ff11ef7b7e925a3c209c5d (diff) |
Merge branch 'master' into autoconfig
Conflicts:
IkiWiki/Plugin/git.pm
debian/changelog
po/ikiwiki.pot
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/git.pm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 6f0ac56d5..b683e4ec3 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -414,11 +414,23 @@ sub rcs_commit_staged ($$$) { $ENV{GIT_AUTHOR_EMAIL}="$u\@web"; } + $message = IkiWiki::possibly_foolish_untaint($message); + my @opts; + if ($message !~ /\S/) { + # Force git to allow empty commit messages. + # (If this version of git supports it.) + my ($version)=`git --version` =~ /git version (.*)/; + if ($version ge "1.5.4") { + push @opts, '--cleanup=verbatim'; + } + else { + $message.="."; + } + } + push @opts, '-q'; # git commit returns non-zero if file has not been really changed. # so we should ignore its exit status (hence run_or_non). - $message = IkiWiki::possibly_foolish_untaint($message); - if (run_or_non('git', 'commit', '--cleanup=verbatim', - '-q', '-m', $message)) { + if (run_or_non('git', 'commit', @opts, '-m', $message)) { if (length $config{gitorigin_branch}) { run_or_cry('git', 'push', $config{gitorigin_branch}); } |