patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-stable] [PATCH] devtools: fix file listing in maintainers check
Date: Tue, 15 Jun 2021 14:49:49 +0200	[thread overview]
Message-ID: <20210615124949.411525-1-thomas@monjalon.net> (raw)

When having multiple working trees, the main one has a .git directory
while attached trees have a .git file.
Thus the git check should work for both file and directory.

In the case there is no working tree (.git not readable), the command
"find" is used and should be able to list paths with wildcards.
Wildcards work only as shell expansion in the case of file paths,
so the quotes must be removed.

Fixes: 27c2ce563216 ("maintainers: start a Linux-style file")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-maintainers.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devtools/check-maintainers.sh b/devtools/check-maintainers.sh
index df3f740b6e..71697bb352 100755
--- a/devtools/check-maintainers.sh
+++ b/devtools/check-maintainers.sh
@@ -15,10 +15,10 @@ files () # <path> [<path> ...]
 	if [ -z "$1" ] ; then
 		return
 	fi
-	if [ -d .git ] ; then
+	if [ -r .git ] ; then
 		git ls-files "$1"
 	else
-		find "$1" -type f |
+		find $1 -type f |
 		sed 's,^\./,,'
 	fi |
 	# if not ended by /
-- 
2.31.1


             reply	other threads:[~2021-06-15 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 12:49 Thomas Monjalon [this message]
2021-06-23  9:19 ` [dpdk-stable] [dpdk-dev] " 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=20210615124949.411525-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).