[U-Boot] [PATCH 2/2] remove main CHANGELOG file

Scott Wood scottwood at freescale.com
Wed May 5 21:45:18 CEST 2010


On 05/05/2010 02:05 PM, Wolfgang Denk wrote:
> Dear Peter Tyser,
>
> In message<1273075406.2451.4225.camel at localhost.localdomain>  you wrote:
>>
>> Could you describe what you use CHANGELOG for?  I often look at logs,
>> but 99% of the time its a log of a specific file or directory to trace a
>> bug, see why feature X was added, etc.  I rarely look at the
>> repositories entire log, and if I do, I use 'git log'.  Although 'git
>> log' takes longer, its guaranteed to be accurate, unlike CHANGELOG which
>> may be slightly out of date.
>
> Most frequently I use it in combination with some form of grep command
> (grep, agrep etc.); sometimes I use it in vi/view for manual searching
> / reading.
>
> Here are a few reasons where I prefer accessing the CHANGELOG over
> running "git log --grep":
>
> 1) it's faster:
>
> 	->  time grep foobar CHANGELOG
>
> 	real    0m0.005s
> 	user    0m0.004s
> 	sys 0m0.001s
>
> 	->  time git log --grep=foobar>/dev/null
>
> 	real    0m0.240s
> 	user    0m0.219s
> 	sys 0m0.021s

Surely the extra quarter second is not too significant compared to the 
time it takes to formulate the query and examine the results.

> 2) it's more efficient:
>
> 	->  strace -f grep foobar CHANGELOG 2>&1>/dev/null | wc -l
> 	143
> 	->  strace -f git log --grep=foobar 2>&1>/dev/null | wc -l
> 	2494

It also requires that a cache be maintained just for this purpose.

> 3) it delivers only the lines I cactually search for, while "git log
>     --grep" always spills out the whole commit message:
>
> 	->  grep MPC512x CHANGELOG | wc -l
> 	24
> 	->  git log --grep=MPC512x | wc -l
> 	272

$ git log | grep MPC512x | wc -l
24

Likewise for grep options and alternate tools.

Or if you really want, you could do this locally, and put CHANGELOG in 
.gitignore:

$ time git log > CHANGELOG

real	0m0.453s
user	0m0.350s
sys	0m0.050s

You could even have a cron job keep it up to date. :-)

-Scott


More information about the U-Boot mailing list