]> git.proxmox.com Git - ovs.git/commit
checkpatch: Fix skipping of the most recent commit.
authorIlya Maximets <i.maximets@samsung.com>
Thu, 15 Jun 2017 11:57:30 +0000 (14:57 +0300)
committerBen Pfaff <blp@ovn.org>
Fri, 16 Jun 2017 04:46:35 +0000 (21:46 -0700)
commit057653abfba0b7dd0d86defc394ec0624414c780
treef34be546458a1ad271966edf6e202bda4d82ba17
parentbf090264e68d160d0ae70ebc93d59bc09d34cc8b
checkpatch: Fix skipping of the most recent commit.

'range(n_patches, 0, -1)' generates list starting from 'n_patches'
and not including zero. This leads to checking of N most recent
commits starting from the second one.

New version will generate right list starting from 'n_patches - 1'
and including zero. So, the most recent commit (HEAD~0) will be
checked and desired behavior will be achieved.

Also, 'reversed' looks better than 'range(n_patches - 1, -1, -1)'

Fixes: a1fccabce2cb ("checkpatch: Support checking recent commits in the current repo.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/checkpatch.py