Re: [PATCH] checkkconfigsymbols.py: make it Git aware

Valentin Rothberg
2015-03-11T14:20:31Z

On Wed, Mar 11, 2015 at 1:04 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
> On Wed, 2015-03-11 at 12:16 +0100, Valentin Rothberg wrote:
>> Note that both options require to 'git reset --hard' the user's Git
>> tree, which can lead to the loss of uncommitted data.
>
> My local "800 line perl monster" basically does
> git ls-tree -r $commit_or_tag
>
> which allows you to generate a list of files and their corresponding
> hashes (it also helps with filtering out symlinks by the way).
>
> The you can do
> git cat-file blob $commit:$path
>
> or just
> git cat-file blob $hash
>
> for every file you're interested in and parse the output of that file
> (in memory, as it were). None of that messes with the current state of
> the tree you're working on.

That's a good point. I used cat-file once in another script but
totally forgot its existence, thanks : ) The patch is already queued,
so I will change the behavior to your suggestion soon.

Kind regards,
Valentin