summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d6abac)
raw | patch | inline | side by side (parent: 1d6abac)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Thu, 20 Oct 2011 17:04:59 +0000 (19:04 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 20 Oct 2011 17:17:14 +0000 (10:17 -0700) |
On the MediaWiki side, the author information is just the MediaWiki login
of the contributor. The import turns it into login@$wiki_name to create
the author's email address on the wiki side. But we don't want this to
include the HTTP password if it's present in the URL ...
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
of the contributor. The import turns it into login@$wiki_name to create
the author's email address on the wiki side. But we don't want this to
include the HTTP password if it's present in the URL ...
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/mw-to-git/git-remote-mediawiki | patch | blob | history |
index 0b32d18eaa963492bfb7fb1bb4437763db7b70c3..c18bfa1f1515a8edb27c2d468a2982860a561939 100755 (executable)
my $wiki_name = $url;
$wiki_name =~ s/[^\/]*:\/\///;
+# If URL is like http://user:password@example.com/, we clearly don't
+# want the password in $wiki_name. While we're there, also remove user
+# and '@' sign, to avoid author like MWUser@HTTPUser@host.com
+$wiki_name =~ s/^.*@//;
# Commands parser
my $entry;