From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2] devtools: select patches to check with git range
Date: Fri, 10 May 2019 09:49:36 +0200 [thread overview]
Message-ID: <1557474576-16619-1-git-send-email-david.marchand@redhat.com> (raw)
Message-ID: <20190510074936.D16vSb8gmmkeZ5VFnNkD-N1g5sO_BIvcQFQz1KAr0PM@z> (raw)
In-Reply-To: <1553260606-28325-1-git-send-email-david.marchand@redhat.com>
Rather than default to origin/master.., it can be handy to choose the
range you want to check.
Example on a branch rebased on next-net:
Before:
[dmarchan@dmarchan dpdk]$ ./devtools/checkpatches.sh
...
...
67/69 valid patches
After:
[dmarchan@dmarchan dpdk]$ ./devtools/checkpatches.sh -r next-net/master..
3/3 valid patches
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/checkpatches.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
Changelog since v1:
- fixed usage string to reflect the new option is exclusive to other
options that select patches (tu clair, Thomas)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 3272774..6a01b39 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -44,13 +44,14 @@ trap "clean_tmp_files" INT
print_usage () {
cat <<- END_OF_HELP
- usage: $(basename $0) [-q] [-v] [-nX|patch1 [patch2] ...]]
+ usage: $(basename $0) [-q] [-v] [-nX|-r range|patch1 [patch2] ...]]
Run Linux kernel checkpatch.pl with DPDK options.
The environment variable DPDK_CHECKPATCH_PATH must be set.
The patches to check can be from stdin, files specified on the command line,
- or latest git commits limited with -n option (default limit: origin/master).
+ latest git commits limited with -n option, or commits in the git range
+ specified with -r option (default: "origin/master..").
END_OF_HELP
}
@@ -79,12 +80,14 @@ check_forbidden_additions() { # <patch>
}
number=0
+range='origin/master..'
quiet=false
verbose=false
-while getopts hn:qv ARG ; do
+while getopts hn:qr:v ARG ; do
case $ARG in
n ) number=$OPTARG ;;
q ) quiet=true ;;
+ r ) range=$OPTARG ;;
v ) verbose=true ;;
h ) print_usage ; exit 0 ;;
? ) print_usage ; exit 1 ;;
@@ -172,7 +175,7 @@ elif [ ! -t 0 ] ; then # stdin
check '' '' "$subject"
else
if [ $number -eq 0 ] ; then
- commits=$(git rev-list --reverse origin/master..)
+ commits=$(git rev-list --reverse $range)
else
commits=$(git rev-list --reverse --max-count=$number HEAD)
fi
--
1.8.3.1
next prev parent reply other threads:[~2019-05-10 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 13:16 [dpdk-dev] [PATCH] " David Marchand
2019-03-22 13:16 ` David Marchand
2019-05-09 21:54 ` Thomas Monjalon
2019-05-09 21:54 ` Thomas Monjalon
2019-05-09 22:05 ` Thomas Monjalon
2019-05-09 22:05 ` Thomas Monjalon
2019-05-10 7:49 ` David Marchand [this message]
2019-05-10 7:49 ` [dpdk-dev] [PATCH v2] " David Marchand
2019-05-10 13:44 ` Thomas Monjalon
2019-05-10 13:44 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1557474576-16619-1-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).