From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nanako Shiraishi <nanako3@lavabit.com>,
git@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
John Tapsell <johnflux@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Pierre Habouzit <madcoder@debian.org>
Subject: Migrate bisect to C (was: [PATCH 1/7] strbuf: add "include_delim" parameter to "strbuf_split")
Date: Sat, 14 Mar 2009 08:46:17 +0100 [thread overview]
Message-ID: <200903140846.17599.chriscool@tuxfamily.org> (raw)
In-Reply-To: <7vfxhhj4mh.fsf@gitster.siamese.dyndns.org>
Le vendredi 13 mars 2009, Junio C Hamano a écrit :
>
> I also do not agree that you have to keep list of skip both in shell and
> rev-list when you go the route I suggested. I think a separate bisect.c
> you did is a good first step to make not just the bisect machinery but
> the whole bisect command into a built-in, and even if we do not do the
> full rewrite in C in one go, moving these "shell script reads from
> refs/bisect only to feed the result to rev-list --bisect" pattern to
> "shell script updates refs/bisect and let rev-list --bisect read from
> there" pattern would be a good initial step. Oh, and I did not mean it
> only for "skip", but also doing this for "good" and "bad" as well.
>
> For example, you read "refs/bisect/skip-*" and keep that in $skip to:
>
> - feed it to filter_skipped() which you are making built-in with this
> series;
>
> - feed it to check_good_are_ancestors_of_bad that in turn calls
> check_merge_bases;
>
> and its use is contained in bisect_next() alone. After this series is
> done, we can move the logic in check_good_are... to bisect.c and you do
> not have to read refs/bisect/skip-* in the shell anymore. IOW, we can
> migrate away from the "shell reads from refs/bisect/ and feeds that to
> rev-list --bisect" pattern incrementally.
Do you mean that you want this series to migrate both "filter_skipped" and
"check_good_are_ancestors_of_bad" to C? Or is it ok
if "check_good_are_ancestors_of_bad" migrates later?
If it is ok to migrate "check_good_are_ancestors_of_bad" later, then I think
something like the 8/7 patch I posted yesterday might be a good way,
because I think a "--bisect-read-refs" option that read refs
from "refs/bisect/*" would not fit well in "git rev-list".
Because, the "git rev-list" usage is:
git rev-list [OPTION] <commit-id>... [ -- paths... ]
That means that at least one <commit-id> should always be passed to "git
rev-list".
So it would be strange to have to pass a commit on the command line when
using the "--bisect-read-refs" option. And I think it would not be very
consistent to change the usage like this:
git rev-list [OPTION] [ --bisect-read-refs | <commit-id>... ] [ --
paths... ]
Also when we migrate "check_good_are_ancestors_of_bad" to C, we will
probably have to move the code that checks out the source code
("bisect_checkout" shell function),
because "check_good_are_ancestors_of_bad" can call "bisect_checkout".
And I don't think that the checkout behavior would fit well in "git
rev-list".
That's why I suggested to add a new "git rev-bisect" plumbing command that
would read refs from "refs/bisect/*" and that could later be fitted with
the "bisect_checkout" and "check_good_are_ancestors_of_bad" behavior.
Best regards,
Christian.
next prev parent reply other threads:[~2009-03-14 7:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 7:51 [PATCH 1/7] strbuf: add "include_delim" parameter to "strbuf_split" Christian Couder
[not found] ` <20090312190846.6117@nanako3.lavabit.com>
2009-03-13 4:48 ` Christian Couder
2009-03-13 5:17 ` Junio C Hamano
2009-03-13 6:02 ` Christian Couder
2009-03-13 6:53 ` Junio C Hamano
2009-03-14 7:46 ` Christian Couder [this message]
2009-03-14 8:16 ` Migrate bisect to C Junio C Hamano
2009-03-14 12:09 ` fetch--tool, was " Johannes Schindelin
2009-03-13 7:06 ` [PATCH 1/7] strbuf: add "include_delim" parameter to "strbuf_split" Junio C Hamano
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=200903140846.17599.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johnflux@gmail.com \
--cc=madcoder@debian.org \
--cc=mingo@elte.hu \
--cc=nanako3@lavabit.com \
/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).