commit ca0217ce5b800ebc7df59354fe894451876704f8
parent e7f3b6485183515d05560db74d639f83fb805b5a
Author: ugrnm <ugrnm@web>
Date: Sun, 5 Jun 2022 19:05:51 +0200
empty web commit
Diffstat:
1 file changed, 35 insertions(+), 0 deletions(-)
diff --git a/installing.mdwn b/installing.mdwn
@@ -107,3 +107,38 @@ Useful to reset passwords, etc.
## Disable OpenID
ikiwiki --setup ikiwiki-cfg/damaged.setup --disable-plugin openid
+
+## Default git commit message when none provided
+
+Ikiwiki and a recent enough version of git allow for empty git messages (the "Optional description of this change" while editing on the web), that's nice but it makes stagit history impossible to browse because it uses such messages as links. To make ikiwiki provide a default commit message when non given, you can do this:
+
+ diff --git a/git.pm.old b/git.pm
+ index 2bc2500..2198207 100644
+ --- a/git.pm.old
+ +++ b/git.pm
+ @@ -680,21 +680,8 @@ sub rcs_commit_helper (@) {
+ $params{message} = IkiWiki::possibly_foolish_untaint($params{message});
+ my @opts;
+ if ($params{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.7.8") {
+ - push @opts, "--allow-empty-message", "--no-edit";
+ - }
+ - if ($version ge "1.7.2") {
+ - push @opts, "--allow-empty-message";
+ - }
+ - elsif ($version ge "1.5.4") {
+ - push @opts, '--cleanup=verbatim';
+ - }
+ - else {
+ - $params{message}.=".";
+ - }
+ + # Force a message to commit if none given.
+ + $params{message}.="empty web commit";
+ }
+ if (exists $params{file}) {
+ push @opts, '--', $params{file};
+
+