mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
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: bbd467c393af5fa34a0b92d5461ff0bf427b3933) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f79d69a6a6
commit
0fefc17507
@@ -508,8 +508,7 @@ class GitApplyTree(PatchTree):
|
|||||||
with open(commithook, 'w') as f:
|
with open(commithook, 'w') as f:
|
||||||
# NOTE: the formatting here is significant; if you change it you'll also need to
|
# NOTE: the formatting here is significant; if you change it you'll also need to
|
||||||
# change other places which read it back
|
# change other places which read it back
|
||||||
f.write('echo >> $1\n')
|
f.write('echo "\n%s: $PATCHFILE" >> $1' % GitApplyTree.patch_line_prefix)
|
||||||
f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix)
|
|
||||||
os.chmod(commithook, 0o755)
|
os.chmod(commithook, 0o755)
|
||||||
shutil.copy2(commithook, applyhook)
|
shutil.copy2(commithook, applyhook)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user