
On 22:18 Thu 16 Oct , Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 1224184956-2864-1-git-send-email-plagnioj@jcrosoft.com you wrote:
+find_config_errors:
- @echo "Search for config errors"
- @git-grep CFG_ | cut -d: -f1 | sort -u | xargs -I {} tools/find_config_errors -f {}
Hm... should we not just use "grep -r *" so this will also work when we don't have a full git repository?
And instead of running another process with "cut", a "-l" argument to grep (or even git-grep) would do the same? [Also note that "git-grep" is deprecated, "git grep" should be used instead.]
I think we should change this into:
grep -l -r * | xargs tools/find_config_errors -f
It will not work with symlinks
when you do not have a git repository you will check compile code, non use file patch maybe etc... and not ignoring files specified in the differents gitignore.
I'll prefer to only activate it when we have a git reprository otherwise the user will use find_config_errors to check it's patch before send it as done with checkpatch.pl.
so I'll propose instead find_config_errors: @echo "Search for config errors" @# Check for git and a git repo. @if head=`git rev-parse --verify HEAD 2>/dev/null`; then \ git grep -l CFG_ | sort -u | xargs -I {} tools/find_config_errors -f {} ;\ fi
Best Regards, J.