diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2020-11-01 00:45:32 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2021-02-04 12:35:30 +0100 |
commit | f054afa5b2b991d7444a52f21972c455235845a2 (patch) | |
tree | 9d159a15493bdbfd148650b6bd0f6364940d1f94 /meta/lib/oe/patch.py | |
parent | 6d82bc8840b9b8f2924d07be62a06a11fe1b0a9f (diff) | |
download | openembedded-core-contrib-f054afa5b2b991d7444a52f21972c455235845a2.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
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
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 d12f0a06c5..da833d09b4 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -515,8 +515,7 @@ class GitApplyTree(PatchTree): with open(commithook, 'w') as f: # NOTE: the formatting here is significant; if you change it you'll also need to # change other places which read it back - f.write('echo >> $1\n') - f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix) + f.write('echo "\n%s: $PATCHFILE" >> $1' % GitApplyTree.patch_line_prefix) os.chmod(commithook, 0o755) shutil.copy2(commithook, applyhook) try: |