From: Karl Hasselström <kha@xxxxxxxxxxx> Not all commits are blessed with a really short first-line summary in their commit messages. This means that we shouldn't blindly take the entire first line of the comment, since that sometimes results in truly spectacular patch names. I chose 30 characters as a reasonable value, considering that we don't yet have any tab-completion on patch names. There's probably not much point in making it configurable. Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx> --- stgit/commands/common.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stgit/commands/common.py b/stgit/commands/common.py index 88b1b94..0e1bb44 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -286,10 +286,10 @@ def name_email_date(address): def make_patch_name(msg): """Return a string to be used as a patch name. This is generated - from the top line of the string passed as argument. - """ + from the first 30 characters of the top line of the string passed + as argument.""" if not msg: return None - subject_line = msg.lstrip().split('\n', 1)[0].lower() + subject_line = msg[:30].lstrip().split('\n', 1)[0].lower() return re.sub('[\W]+', '-', subject_line).strip('-') - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html