diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2020-05-30 00:03:26 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:27:29 +0100 |
commit | 71ef6bbb85eba1b872d5eed53c721b42bd8bd22d (patch) | |
tree | 5a57e18bc489c65895c163c013716d4d83a1e29a /meta/lib/oe/patch.py | |
parent | 15ee96a245c39f722c57b5f664b146223a6cdbe5 (diff) | |
download | poky-71ef6bbb85eba1b872d5eed53c721b42bd8bd22d.tar.gz |
lib/oe/patch: GitApplyTree: save 1 echo in commit-msg hook
* also remove the extra blank lines which is often added to patches
when refreshed with devtool (GitApplyTree.patch_line_prefix lines
are ignored when refreshing .patch files, but newly added blank
lines aren't - the leading blank line wasneeded for patches with
just the subject line (to prevent the GitApplyTree.patch_line_prefix
line ending appended to the commit summary), but we can add it
in prepareCommit instead
(From OE-Core rev: c50c0d6144ad290168167ccef948c7b4ffc9665a)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index fa92abe248..bb1c40aa1e 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
@@ -508,8 +508,7 @@ class GitApplyTree(PatchTree): | |||
508 | with open(commithook, 'w') as f: | 508 | with open(commithook, 'w') as f: |
509 | # NOTE: the formatting here is significant; if you change it you'll also need to | 509 | # NOTE: the formatting here is significant; if you change it you'll also need to |
510 | # change other places which read it back | 510 | # change other places which read it back |
511 | f.write('echo >> $1\n') | 511 | f.write('echo "\n%s: $PATCHFILE" >> $1' % GitApplyTree.patch_line_prefix) |
512 | f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix) | ||
513 | os.chmod(commithook, 0o755) | 512 | os.chmod(commithook, 0o755) |
514 | shutil.copy2(commithook, applyhook) | 513 | shutil.copy2(commithook, applyhook) |
515 | try: | 514 | try: |