From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] bisect: display first bad commit without forking a new process
Date: Wed, 27 May 2009 15:38:05 -0700 [thread overview]
Message-ID: <7veiuai33m.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <200905272107.52095.chriscool@tuxfamily.org> (Christian Couder's message of "Wed\, 27 May 2009 21\:07\:52 +0200")
Christian Couder <chriscool@tuxfamily.org> writes:
> Le Wednesday 27 May 2009, Christian Couder a écrit :
>> Previously "git diff-tree --pretty COMMIT" was run using
>> "run_command_v_opt" to display information about the first bad
>> commit.
>>
>> The goal of this patch is to avoid a "fork" and an "exec" call
>> when displaying that information.
>>
>> To do that, we manually setup revision information as
>> "git diff-tree --pretty" would do it, and then use the
>> "log_tree_commit" function.
>>
>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
>> ---
>> bisect.c | 30 +++++++++++++++++++++++++++---
>> 1 files changed, 27 insertions(+), 3 deletions(-)
>>
>> diff --git a/bisect.c b/bisect.c
>> index c43c120..e94a77b 100644
>> --- a/bisect.c
>> +++ b/bisect.c
>> @@ -816,6 +816,31 @@ static void check_good_are_ancestors_of_bad(const
>> char *prefix) }
>>
>> /*
>> + * This does "git diff-tree --pretty COMMIT" without one fork+exec.
>> + */
>> +static void show_diff_tree(const char *prefix, struct commit *commit)
>> +{
>> + static struct rev_info opt;
>
> Oops, "static" can be removed, it's a copy-paste error, sorry.
Is that "can" or "must"? If the answer is the latter, shouldn't the
function be renamed to make it clear it is a bisect specific thing?
next prev parent reply other threads:[~2009-05-27 22:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 5:23 [PATCH] bisect: display first bad commit without forking a new process Christian Couder
2009-05-27 19:07 ` Christian Couder
2009-05-27 22:38 ` Junio C Hamano [this message]
2009-05-28 8:04 ` Andreas Ericsson
2009-05-28 21:20 ` Christian Couder
-- strict thread matches above, loose matches on Subject: below --
2009-05-28 21:21 Christian Couder
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=7veiuai33m.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
/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).