remote-hg: the author email can be null
authorFelipe Contreras <felipe.contreras@gmail.com>
Sun, 4 Nov 2012 02:13:38 +0000 (03:13 +0100)
committerJeff King <peff@peff.net>
Sun, 4 Nov 2012 13:35:21 +0000 (08:35 -0500)
Like 'Foo <>'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
contrib/remote-helpers/git-remote-hg
index a9ae8446fb111eee071d8a7142994b1a5b0b0442..7929eec30b39280985a9d2b7147699d99e211817 100755 (executable)
@@ -35,9 +35,9 @@ import urllib
 #
 
 NAME_RE = re.compile('^([^<>]+)')
-AUTHOR_RE = re.compile('^([^<>]+?)? ?<([^<>]+)>$')
-AUTHOR_HG_RE = re.compile('^(.*?) ?<(.+?)(?:>(.+)?)?$')
-RAW_AUTHOR_RE = re.compile('^(\w+) (?:(.+)? )?<(.+)> (\d+) ([+-]\d+)')
+AUTHOR_RE = re.compile('^([^<>]+?)? ?<([^<>]*)>$')
+AUTHOR_HG_RE = re.compile('^(.*?) ?<(.*?)(?:>(.+)?)?$')
+RAW_AUTHOR_RE = re.compile('^(\w+) (?:(.+)? )?<(.*)> (\d+) ([+-]\d+)')
 
 def die(msg, *args):
     sys.stderr.write('ERROR: %s\n' % (msg % args))