Patchwork [U-Boot,v2,2/7] patman: Don't allow spaces in tags

login
register
mail settings
Submitter Simon Glass
Date March 26, 2013, 11:09 p.m.
Message ID <1364339385-10035-3-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/231571/
State Accepted, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - March 26, 2013, 11:09 p.m.
At present something like:

   Revert "arm: Add cache operations"

will try to use

   Revert "arm

as a tag. Clearly this is wrong, so fix it.

If the revert is intended to be tagged, then the tag can come before
the revert, perhaps. Alternatively the 'Cc' tag can be used in the commit
messages.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Adjust to not allow any spaces in tags, change commit title

 tools/patman/commit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Doug Anderson - April 1, 2013, 11:22 p.m.
Simon,

On Tue, Mar 26, 2013 at 4:09 PM, Simon Glass <sjg@chromium.org> wrote:
> At present something like:
>
>    Revert "arm: Add cache operations"
>
> will try to use
>
>    Revert "arm
>
> as a tag. Clearly this is wrong, so fix it.
>
> If the revert is intended to be tagged, then the tag can come before
> the revert, perhaps. Alternatively the 'Cc' tag can be used in the commit
> messages.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> Changes in v2:
> - Adjust to not allow any spaces in tags, change commit title
>
>  tools/patman/commit.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Doug Anderson <dianders@chromium.org>

Patch

diff --git a/tools/patman/commit.py b/tools/patman/commit.py
index 7144e54..cbfbc46 100644
--- a/tools/patman/commit.py
+++ b/tools/patman/commit.py
@@ -22,7 +22,7 @@ 
 import re
 
 # Separates a tag: at the beginning of the subject from the rest of it
-re_subject_tag = re.compile('([^:]*):\s*(.*)')
+re_subject_tag = re.compile('([^:\s]*):\s*(.*)')
 
 class Commit:
     """Holds information about a single commit/patch in the series.