On Fri, Jul 14, 2017 at 6:57 AM, Ilya Maximets <i.maxim...@samsung.com> wrote: > It's better to see real commits instead of 'HEAD~n'. > > Signed-off-by: Ilya Maximets <i.maxim...@samsung.com> > --- > utilities/checkpatch.py | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-)
Thanks for the patches! I applied all 4 to master. > > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py > index 7ccec51..f61b8b7 100755 > --- a/utilities/checkpatch.py > +++ b/utilities/checkpatch.py > @@ -500,13 +500,19 @@ if __name__ == '__main__': > > if n_patches: > status = 0 > + > + git_log = 'git log --no-color --no-merges --pretty=format:"%H %s" ' > + f = os.popen(git_log + '-%d' % n_patches, 'r') > + commits = f.read().split("\n") > + f.close() > + I slightly modified this to be: @@ -502,9 +502,8 @@ if __name__ == '__main__': status = 0 git_log = 'git log --no-color --no-merges --pretty=format:"%H %s" ' - f = os.popen(git_log + '-%d' % n_patches, 'r') - commits = f.read().split("\n") - f.close() + with os.popen(git_log + '-%d' % n_patches, 'r') as f: + commits = f.read().split("\n") for i in reversed(range(0, n_patches)): revision, name = commits[i].split(" ", 1) _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev