Searched hist:"9 d8c378dfa3dfb21552c7c1074c9b81f2c09a4f1" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/scripts/ |
| H A D | checkpatch_inc.sh | 9d8c378dfa3dfb21552c7c1074c9b81f2c09a4f1 Mon Apr 16 15:13:33 UTC 2018 Jerome Forissier <jerome.forissier@linaro.org> checkpatch_inc.sh: fix case of empty commit due to path filtering
If a commit changes only paths that are filtered out by $_CP_EXCL, thus making the diff empty, 'git format-patch -1 <sha1>' will show the parent commit instead. As a result, checkpatch.sh will check the wrong commit.
Several things are needed to fix the issue:
1. When calling 'git format-patch', specify the commit ID as a range (<sha1>^..<sha1>) rather than as a single revision with a maximum count (-1 <sha1>). This avoids showing the wrong commit. 2. Show the commit message then the diff in two steps, because the above syntax will not print anything if the diff happens to be empty. 3. Tell checkpatch.pl to ignore the "not a unified diff" error which is triggered if the commit log is not followed by a diff.
Link: https://travis-ci.org/OP-TEE/optee_os/builds/367058383#L2199-L2204 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
|