From: Valentin Rothberg <valentinrothberg@gmail.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Greg KH <gregkh@linuxfoundation.org>,
hengelein Stefan <stefan.hengelein@fau.de>,
linux-kernel@vger.kernel.org,
Andreas Ruprecht <rupran@einserver.de>
Subject: Re: [PATCH] checkkconfigsymbols.py: make it Git aware
Date: Wed, 11 Mar 2015 16:04:55 +0100 [thread overview]
Message-ID: <CAD3Xx4+N=J5Bf6HX2Oe+=vSzWyKrRRpZqtVLjub-H1cCf-9zKQ@mail.gmail.com> (raw)
In-Reply-To: <CAD3Xx4Kp8griLJrR3H7G2AU0_YZeV-xvrdnxV-dTr=YuDmop9w@mail.gmail.com>
It seems that using 'git cat-file blob commit:path' instead of 'git reset
--hard commit' + open is much more expensive.
The execution time jumps from 3 secs to 3 mins.
Paul, how long does your monster run? Maybe I just call it wrong or
mess up with caches.
Kind regards,
Valentin
On Wed, Mar 11, 2015 at 3:33 PM, Valentin Rothberg
<valentinrothberg@gmail.com> wrote:
> On Wed, Mar 11, 2015 at 3:19 PM, Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>> 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.
>
> Sorry for confusion. This patch is not queued yet. The one that
> filters toos/ has been queued : )
>
> Valentin
next prev parent reply other threads:[~2015-03-11 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 11:16 [PATCH] checkkconfigsymbols.py: make it Git aware Valentin Rothberg
2015-03-11 12:04 ` Paul Bolle
2015-03-11 14:19 ` Valentin Rothberg
2015-03-11 14:33 ` Valentin Rothberg
2015-03-11 15:04 ` Valentin Rothberg [this message]
2015-03-13 20:20 ` Paul Bolle
2015-03-14 16:28 ` Valentin Rothberg
2015-03-16 10:38 ` [PATCH v2] " Valentin Rothberg
2015-03-16 11:16 ` [PATCH v3] " Valentin Rothberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD3Xx4+N=J5Bf6HX2Oe+=vSzWyKrRRpZqtVLjub-H1cCf-9zKQ@mail.gmail.com' \
--to=valentinrothberg@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=rupran@einserver.de \
--cc=stefan.hengelein@fau.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).