patman: Split alias entries on arbitrary whitespace
authorAdam Sampson <ats@offog.org>
Wed, 27 Jun 2018 13:38:58 +0000 (14:38 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 26 Jul 2018 20:18:38 +0000 (14:18 -0600)
Previously the first three words in a git-mailrc alias entry could only
be separated by spaces. git-send-email and Mutt both allow arbitrary
whitespace here.

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/patman/settings.py

index 94ea5b5..ca43344 100644 (file)
@@ -263,7 +263,7 @@ def _ReadAliasFile(fname):
                 line = line.strip()
                 if not line or line.startswith('#'):
                     continue
-                words = line.split(' ', 2)
+                words = line.split(None, 2)
                 if len(words) < 3 or words[0] != 'alias':
                     if not bad_line:
                         bad_line = "%s:%d:Invalid line '%s'" % (fname, linenum,