Skip to content

Commit

Permalink
devtools: fix file listing in maintainers check
Browse files Browse the repository at this point in the history
[ upstream commit 2d333c4 ]

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")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
  • Loading branch information
tmonjalo authored and bluca committed Jul 12, 2021
1 parent e2f67db commit d07ee66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devtools/check-maintainers.sh
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 d07ee66

Please sign in to comment.