Skip to content

Commit

Permalink
devtools: fix file listing in maintainers check
Browse files Browse the repository at this point in the history
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: 27c2ce5 ("maintainers: start a Linux-style file")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
  • Loading branch information
tmonjalo committed Jun 23, 2021
1 parent 3c1199c commit 2d333c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devtools/check-maintainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down

0 comments on commit 2d333c4

Please sign in to comment.