[U-Boot] [PATCH 1/1] add tool to check patch and file for CFG_ presence

Wolfgang Denk wd at denx.de
Thu Oct 16 23:51:08 CEST 2008


Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20081016211010.GA2807 at 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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
8 Catfish                                               = 1 Octo-puss


More information about the U-Boot mailing list