public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
Date: Sat, 14 Jan 2017 14:23:13 +0000 (UTC)	[thread overview]
Message-ID: <1484403693.db7779a27f6f1b8c54e74adae98a25ca9fff66f3.floppym@gentoo> (raw)

commit:     db7779a27f6f1b8c54e74adae98a25ca9fff66f3
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 17:33:19 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 14:21:33 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=db7779a2

repoman: remove extra blank line in commit footer

This results in cleaner/more compact commit messages when the author has
already included some "Field: value" pair in the commit message body.

This check simply looks for a colon in the last line of the commit
message body.

Before:
  dev-libs/libfoo: fix something

  Yada yada yada.

  Gentoo-Bug: 123

  Package-Manager: Portage-2.3.3, Repoman-2.3.1

After:
  dev-libs/libfoo: fix something

  Yada yada yada.

  Gentoo-Bug: 123
  Package-Manager: Portage-2.3.3, Repoman-2.3.1

 repoman/pym/repoman/actions.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 189580e..58b00d4 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -128,6 +128,10 @@ class Actions(object):
 					myupdates, mymanifests, myremoved, mychanged, myautoadd,
 					mynew, commitmessage)
 
+		lastline = commitmessage.splitlines()[-1]
+		if not ':' in lastline:
+			commitmessage += '\n'
+
 		commit_footer = self.get_commit_footer()
 		commitmessage += commit_footer
 
@@ -337,7 +341,7 @@ class Actions(object):
 			portage_version = "Unknown"
 		# Use new footer only for git (see bug #438364).
 		if self.vcs_settings.vcs in ["git"]:
-			commit_footer = "\n\nPackage-Manager: Portage-%s, Repoman-%s" % (
+			commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % (
 							portage.VERSION, VERSION)
 			if report_options:
 				commit_footer += "\nRepoMan-Options: " + " ".join(report_options)
@@ -351,7 +355,7 @@ class Actions(object):
 				unameout += platform.processor()
 			else:
 				unameout += platform.machine()
-			commit_footer = "\n\n"
+			commit_footer = "\n"
 			if dco_sob:
 				commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
 			commit_footer += "(Portage version: %s/%s/%s" % \


             reply	other threads:[~2017-01-14 14:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-14 14:23 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-30 17:23 [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/ Zac Medico
2018-02-27 19:07 Michał Górny
2018-02-27 19:07 Michał Górny
2017-08-06  6:54 Michał Górny
2017-07-18 23:08 Brian Dolbec
2017-03-15 21:56 Brian Dolbec
2017-03-01 19:22 Brian Dolbec
2017-03-01 18:40 Brian Dolbec
2017-01-14 19:10 Mike Gilbert
2017-01-13 17:13 Zac Medico
2017-01-06 17:17 Brian Dolbec
2017-01-06 17:17 Brian Dolbec
2017-01-06 17:17 Brian Dolbec
2016-12-06  3:54 Brian Dolbec
2016-10-11 18:54 Brian Dolbec
2016-09-15 18:46 Brian Dolbec
2016-09-15 18:46 Brian Dolbec
2016-06-30  5:54 Michał Górny
2016-06-28 15:34 Mike Frysinger
2016-06-24  6:38 Zac Medico
2016-05-15 23:51 Brian Dolbec

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=1484403693.db7779a27f6f1b8c54e74adae98a25ca9fff66f3.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox