From: Matthieu Moy Date: Mon, 16 Jul 2012 19:06:33 GMT Subject: Re: [PATCH 2/8] git-remote-mediawiki: actually send empty comment when they're empty Message-ID: In-Reply-To: <7vd33v377x.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Matthieu Moy writes: > >> Signed-off-by: Matthieu Moy >> --- >> contrib/mw-to-git/git-remote-mediawiki | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki >> index a6ad8cf..a2da52f 100755 >> --- a/contrib/mw-to-git/git-remote-mediawiki >> +++ b/contrib/mw-to-git/git-remote-mediawiki >> @@ -51,6 +51,9 @@ use constant EMPTY_CONTENT => "\n"; >> # used to reflect file creation or deletion in diff. >> use constant NULL_SHA1 => "0000000000000000000000000000000000000000"; >> >> +# Used on Git's side to reflect empty edit messages on the wiki >> +use constant EMPTY_MESSAGE => '*Empty MediaWiki Message*'; >> + > > Is there a reason why this sentinel value cannot be a real empty > string? That would mean having an empty commit message on the Git side, which is against the use (although possible with fast-import). The import turns empty mediawiki messages (which are very common in my experience) into this string to provide a nicer-looking history. It's not like EMPTY_CONTENT, which is explicitely forbidden on the MediaWiki side, hence really cannot be the empty string. Ideally, EMPTY_MESSAGE could be configurable, and the empty string could be an acceptable value to make this conversion optional. (note that the string was already there, my patch only makes it a constant to be able to use it in two distinct places). -- Matthieu Moy http://www-verimag.imag.fr/~moy/