On Wed, 27 Jan 2016 20:25:25 -0700 Jerry Snitselaar <[email protected]> wrote:
> Currently if you pick a commit using the expose option it > appends the imported from commit line immediately after > what it gets for the log without inserting a new line. > This can result in the imported from commit line being > tagged on to the end of a Signed-off-by: line or something > else. I ran into this while doing some backporting of > kernel commits at work. > > Insert a new line before the imported from commit > data. > > Signed-off-by: Jerry Snitselaar <[email protected]> > --- > stgit/commands/pick.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/stgit/commands/pick.py b/stgit/commands/pick.py > index df9d798..e3a4ef3 100644 > --- a/stgit/commands/pick.py > +++ b/stgit/commands/pick.py > @@ -117,7 +117,7 @@ def __pick_commit(commit_id, patchname, options): > message = 'Revert "%s"\n\nThis reverts commit %s.\n\n%s\n' \ > % (subject, commit.get_id_hash(), body) > elif options.expose: > - message += '(imported from commit %s)\n' % commit.get_id_hash() > + message += '\n(imported from commit %s)\n' % commit.get_id_hash() Just a thought: maybe you can add \n only if not message.endswith('\n') ? > author_name, author_email, author_date = \ > name_email_date(commit.get_author()) > if options.revert: _______________________________________________ stgit-users mailing list [email protected] https://mail.gna.org/listinfo/stgit-users
