patman: Allow skipping patches at the end
The -s option allows skipping patches at the top of the branch. Sometimes
there are commits at the bottom that need to be skipped. At present it is
necessary to count the number of commits and then use -c to tell patman
how many to process.
Add a -e option to easily skip a number of commits at the bottom of the
branch.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/main.py b/tools/patman/main.py
index 0667541..4d7a304 100755
--- a/tools/patman/main.py
+++ b/tools/patman/main.py
@@ -35,6 +35,8 @@
help="Branch to process (by default, the current branch)")
parser.add_option('-c', '--count', dest='count', type='int',
default=-1, help='Automatically create patches from top n commits')
+parser.add_option('-e', '--end', type='int', default=0,
+ help='Commits to skip at end of patch list')
parser.add_option('-i', '--ignore-errors', action='store_true',
dest='ignore_errors', default=False,
help='Send patches email even if patch errors are found')