From: Christian Couder <christian.couder@gmail.com>
To: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Cc: git@vger.kernel.org, Franck Jonas <Franck.Jonas@ensimag.imag.fr>,
Lucien Kong <Lucien.Kong@ensimag.imag.fr>,
Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>,
Huynh Khoi Nguyen Nguyen
<Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCHv2] git bisect old/new
Date: Wed, 13 Jun 2012 12:05:11 +0200 [thread overview]
Message-ID: <CAP8UFD1A+GggOOb4-GYn5O1vFWpCUZ8b98Z-WOZc4gorC4p=yg@mail.gmail.com> (raw)
In-Reply-To: <1339541765-2078-1-git-send-email-Valentin.Duperray@ensimag.imag.fr>
On Wed, Jun 13, 2012 at 12:56 AM, Valentin Duperray
<Valentin.Duperray@ensimag.imag.fr> wrote:
>
> Related discussions:
>
> - http://thread.gmane.org/gmane.comp.version-control.git/86063
> introduced bisect fix unfixed to find fix.
> - http://thread.gmane.org/gmane.comp.version-control.git/182398
> discussion around bisect yes/no or old/new.
Thanks!
> /*
> + * The terms used for this bisect session are stocked in
> + * BISECT_TERMS: it can be bad/good or new/old.
> + * We read them and stock them to adapt the messages
> + * accordingly. Default is bad/good.
> + */
> +void read_bisect_terms(void)
> +{
> + struct strbuf str = STRBUF_INIT;
> + const char *filename = git_path("BISECT_TERMS");
> + FILE *fp = fopen(filename, "r");
> +
> + if (!fp) {
> + bisect_bad = "bad";
> + bisect_good = "good";
Ok, but...
> + } else {
> + strbuf_getline(&str, fp, '\n');
> + bisect_bad = strbuf_detach(&str, NULL);
> + strbuf_getline(&str, fp, '\n');
> + bisect_good = strbuf_detach(&str, NULL);
> + }
> + strbuf_release(&str);
> + fclose(fp);
> +}
> @@ -953,6 +991,8 @@ int bisect_next_all(const char *prefix, int no_checkout)
> "(roughly %d step%s)\n", nr, (nr == 1 ? "" : "s"),
> steps, (steps == 1 ? "" : "s"));
>
> + free((char*)bisect_bad);
> + free((char*)bisect_good);
...it is not a good thing to free these variables if they were not allocated.
> +
> return bisect_checkout(bisect_rev_hex, no_checkout);
> }
> case "$missing_good,$missing_bad,$1" in
> ,,*)
> - : have both good and bad - ok
> + : have both good and bad or old and new - ok
Maybe ": have both $BISECT_GOOD and $BISECT_BAD - ok".
Thanks,
Christian.
prev parent reply other threads:[~2012-06-13 10:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 2:03 [PATCH] git bisect old/new Valentin Duperray
2012-06-12 5:25 ` Christian Couder
2012-06-12 5:43 ` Junio C Hamano
2012-06-12 19:41 ` Phil Hord
2012-06-13 10:12 ` Christian Couder
2012-06-13 17:30 ` Junio C Hamano
2012-06-12 22:56 ` [PATCHv2] " Valentin Duperray
2012-06-12 23:54 ` Junio C Hamano
2012-06-13 18:06 ` duperrav
2012-06-14 9:56 ` Christian Couder
2012-06-14 17:34 ` Junio C Hamano
2012-06-15 20:20 ` Phil Hord
2012-06-15 21:06 ` Junio C Hamano
2012-06-13 10:05 ` Christian Couder [this message]
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='CAP8UFD1A+GggOOb4-GYn5O1vFWpCUZ8b98Z-WOZc4gorC4p=yg@mail.gmail.com' \
--to=christian.couder@gmail.com \
--cc=Franck.Jonas@ensimag.imag.fr \
--cc=Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr \
--cc=Lucien.Kong@ensimag.imag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=Thomas.Nguy@ensimag.imag.fr \
--cc=Valentin.Duperray@ensimag.imag.fr \
--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).