Pass --no-edit when used with git 1.7.8 and newer.

Not sure if this is needed to avoid it trying to run an editor. Probably
there is never a controlling terminal and probably git notices and does
nothing. But I'm just copying what I have in git-annex assistant here.

(Although with a much worse git version comparion, that only really works due
to luck.)
master
Joey Hess 2013-07-10 21:52:43 -04:00
parent b162563dc1
commit 946af13ae6
2 changed files with 4 additions and 0 deletions

View File

@ -550,6 +550,9 @@ sub rcs_commit_helper (@) {
# Force git to allow empty commit messages.
# (If this version of git supports it.)
my ($version)=`git --version` =~ /git version (.*)/;
if ($version ge "1.7.8") {
push @opts, "--allow-empty-message", "--no-edit";
}
if ($version ge "1.7.2") {
push @opts, "--allow-empty-message";
}

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ ikiwiki (3.20130711) unstable; urgency=low
* Deal with git behavior change in 1.7.2 and newer that broke support
for commits with an empty commit message.
* Pass --no-edit when used with git 1.7.8 and newer.
-- Joey Hess <joeyh@debian.org> Wed, 10 Jul 2013 21:49:23 -0400