From 04a9dbfe7daa9c352ae4e9af17df8134248f3806 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 22 Nov 2006 14:28:38 +0000 Subject: updates --- IkiWiki/Rcs/git.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Rcs/git.pm') diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm index 46adf1657..05eaa8d78 100644 --- a/IkiWiki/Rcs/git.pm +++ b/IkiWiki/Rcs/git.pm @@ -294,12 +294,19 @@ sub rcs_prepedit ($) { #{{{ return git_sha1($file); } #}}} -sub rcs_commit ($$$) { #{{{ +sub rcs_commit ($$$;$$) { #{{{ # Try to commit the page; returns undef on _success_ and # a version of the page with the rcs's conflict markers on # failure. - my ($file, $message, $rcstoken) = @_; + my ($file, $message, $rcstoken, $user, $ipaddr) = @_; + + if (defined $user) { + $message="web commit by $user".(length $message ? ": $message" : ""); + } + elsif (defined $ipaddr) { + $message="web commit from $ipaddr".(length $message ? ": $message" : ""); + } # XXX: Wiki directory is in the unlocked state when starting this # action. But it takes time for a Git process to finish its job -- cgit v1.2.3