From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] combo-layer: make Signed-off-by optional
Date: Mon, 9 Mar 2015 13:56:39 +0100 [thread overview]
Message-ID: <1425905799-9101-1-git-send-email-patrick.ohly@intel.com> (raw)
It depends on the diligence of the person running the combo-layer tool
whether the Signed-off-by line added to each commit actually indicates
that the person was involved in validating the change.
When the import is purely automatic, it is better to not add the line,
because the history is more useful without it (searching for the person
really only lists changes he or she was involved with) and it would
be a false statement.
This needs to be configurable, achieved with a new global "signoff"
boolean property in combo-layer.conf, in the "DEFAULT" section.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
scripts/combo-layer | 4 +++-
scripts/combo-layer.conf.example | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 19d64e6..60ead5b 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -75,6 +75,8 @@ class Configuration(object):
self.parser.readfp(f)
self.repos = {}
+ self.signoff = not self.parser.has_option('DEFAULT', 'signoff') or \
+ self.parser.getboolean('DEFAULT', 'signoff')
for repo in self.parser.sections():
self.repos[repo] = {}
readsection(self.parser, repo, repo)
@@ -471,7 +473,7 @@ def apply_patchlist(conf, repos):
if os.path.getsize(patchfile) == 0:
logger.info("(skipping %d/%d %s - no changes)" % (i, linecount, patchdisp))
else:
- cmd = "git am --keep-cr -s -p1 %s" % patchfile
+ cmd = "git am --keep-cr %s-p1 %s" % ('-s ' if conf.signoff else '', patchfile)
logger.info("Applying %d/%d: %s" % (i, linecount, patchdisp))
try:
runcmd(cmd)
diff --git a/scripts/combo-layer.conf.example b/scripts/combo-layer.conf.example
index 010a692..8ad8615 100644
--- a/scripts/combo-layer.conf.example
+++ b/scripts/combo-layer.conf.example
@@ -1,5 +1,11 @@
# combo-layer example configuration file
+# global options
+[DEFAULT]
+
+# Add 'Signed-off-by' to all commits that get imported automatically.
+signoff = True
+
# component name
[bitbake]
# mandatory options
--
2.1.4
next reply other threads:[~2015-03-09 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 12:56 Patrick Ohly [this message]
2015-03-12 18:21 ` [PATCH] combo-layer: make Signed-off-by optional Paul Eggleton
2015-03-12 19:45 ` Patrick Ohly
2015-03-13 8:57 ` Paul Eggleton
2015-03-13 13:31 ` Patrick Ohly
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=1425905799-9101-1-git-send-email-patrick.ohly@intel.com \
--to=patrick.ohly@intel.com \
--cc=openembedded-core@lists.openembedded.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