From: Junio C Hamano <gitster@pobox.com>
To: Torstein Hegge <hegge@resisty.net>
Cc: git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] bisect: Store first bad commit as comment in log file
Date: Sun, 14 Apr 2013 23:50:37 -0700 [thread overview]
Message-ID: <7v4nf82soy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130413152257.GB16040@pvv.ntnu.no> (Torstein Hegge's message of "Sat, 13 Apr 2013 17:22:57 +0200")
Torstein Hegge <hegge@resisty.net> writes:
> When bisect successfully finds a single revision, the first bad commit
> should be shown to human readers of 'git bisect log'.
>
> This resolves the apparent disconnect between the bisection result and
> the log when a bug reporter says "I know that the first bad commit is
> $rev, as you can see from $(git bisect log)".
>
> Signed-off-by: Torstein Hegge <hegge@resisty.net>
> ---
> I don't know how useful the added test is, I didn't find any existing
> tests that looks at the comment parts of bisect log.
>
> git-bisect.sh | 8 +++++++-
> t/t6030-bisect-porcelain.sh | 18 ++++++++++++++++++
> 2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 99efbe8..c58eea7 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -311,7 +311,13 @@ bisect_next() {
> res=$?
>
> # Check if we should exit because bisection is finished
> - test $res -eq 10 && exit 0
> + if test $res -eq 10
> + then
> + bad_rev=$(git show-ref --hash --verify refs/bisect/bad)
> + bad_commit=$(git show-branch $bad_rev)
> + echo "# first bad commit: $bad_commit" >>"$GIT_DIR/BISECT_LOG"
As this is "# commented out", replaying will safely ignore this new
record, so this should be safe.
prev parent reply other threads:[~2013-04-15 6:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 15:22 [PATCH] bisect: Store first bad commit as comment in log file Torstein Hegge
2013-04-15 4:38 ` Christian Couder
2013-04-15 9:53 ` Torstein Hegge
2013-04-15 15:00 ` Junio C Hamano
2013-04-22 21:02 ` Torstein Hegge
2013-04-22 21:13 ` Junio C Hamano
2013-04-22 22:20 ` Torstein Hegge
2013-04-22 22:37 ` Junio C Hamano
2013-04-25 4:26 ` Christian Couder
2013-05-22 22:27 ` [PATCH] bisect: Fix log output for multi-parent skip ranges Torstein Hegge
2013-04-15 6:50 ` Junio C Hamano [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=7v4nf82soy.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=hegge@resisty.net \
/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).