From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [PATCH 1/2] Generate shorter patch names
Date: Tue, 07 Nov 2006 07:59:26 +0100 [thread overview]
Message-ID: <20061107065925.10728.85759.stgit@localhost> (raw)
In-Reply-To: <20061107065710.10728.85618.stgit@localhost>
From: Karl Hasselström <kha@treskal.com>
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@treskal.com>
---
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()
next prev parent reply other threads:[~2006-11-07 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-07 6:57 [PATCH 0/2] Generate saner automatic patch names Karl Hasselström
2006-11-07 6:59 ` Karl Hasselström [this message]
2006-11-07 6:59 ` [PATCH 2/2] Generate unique " Karl Hasselström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061107065925.10728.85759.stgit@localhost \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.