
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20081016211010.GA2807@game.jcrosoft.org you wrote:
I think we should change this into:
grep -l -r * | xargs tools/find_config_errors -f
It will not work with symlinks
You don't want to run this in a dirty tree, do you?
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.
Hm... why should I run this in a drity tree?
I'll prefer to only activate it when we have a git reprository
I don't. There are quite a lot of people out there not using git for their work. Unless really necessary we should not cut them off. And here it seems not really necessary.
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
Comments - if we do this only when git is available, then:
- we must issue an error message and set an error return code if git is missing - I don't see much use for the "| sort -u" part of the pipe ? - I don't see much sense for the "-I {}" and "{}" parts in the xargs command ?
Best regards,
Wolfgang Denk