On Thu, Jun 15, 2017 at 02:57:30PM +0300, Ilya Maximets wrote:
> '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 <[email protected]>

Thanks for the fix.  I applied it.

(This was a truly dumb logic error of mine.  I spent a few minutes
playing with Python expressions to count down from N to 1, inclusive,
thinking I wanted, e.g., HEAD~4 through HEAD~1, and even tested it, and
never realized that I really want HEAD~3 through HEAD~0.)
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to