From: Jon Seymour <jon.seymour@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, chriscool@tuxfamily.org, j6t@kdbg.org,
jnareb@gmail.com, jrnieder@gmail.com
Subject: Re: [PATCH v3 1/1] bisect: add support for bisecting bare repositories
Date: Wed, 10 Aug 2011 09:12:50 +1000 [thread overview]
Message-ID: <CAH3Anrr1eDuG9WNGb168ekMUnRcfEu4TPnGcSnh9TwLpvVMkBw@mail.gmail.com> (raw)
In-Reply-To: <7vty9qsdhp.fsf@alter.siamese.dyndns.org>
On Wed, Aug 10, 2011 at 3:26 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jon Seymour <jon.seymour@gmail.com> writes:
>
>> This extension to js/bisect-no-checkout adds support for bisecting bare repositories.
>>
>> It does this by relaxing the requirement that git bisect is invoked in a repository with a working tree and by defaulting to --no-checkout in the case of a bare repository.
>>
>> Two tests are included to demonstrate this behaviour.
>
> I'd wrap the long line myself but next time please be careful.
>
>> diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
>> index 4fb7d11..62125ec 100755
>> --- a/t/t6030-bisect-porcelain.sh
>> +++ b/t/t6030-bisect-porcelain.sh
>> @@ -592,6 +592,37 @@ test_expect_success 'erroring out when using bad path parameters' '
>> grep "bad path parameters" error.txt
>> '
>>
>> +test_expect_success 'test bisection on bare repo - --no-checkout specified' '
>> + git clone --bare . bare.nocheckout &&
>> + (
>> + cd bare.nocheckout &&
>> + git bisect start --no-checkout &&
>> + git bisect good $HASH1 &&
>> + git bisect bad $HASH4 &&
>> + git bisect run eval \
>> + "test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>> + >../nocheckout.log &&
>> + git bisect reset
>> + ) &&
>> + grep "$HASH3 is the first bad commit" nocheckout.log
>> +'
>
> git-bisect does not have any cd_to_toplevel so with a working tree you can
> run a bisection from a subdirectory, it seems. I wonder what would happen
> if you did "cd bare.nocheckout/objects" or something silly like that.
>
> Just wondering...
>
Well, nothing obviously breaks...
expecting success:
git clone --bare . bare.silly &&
(
cd bare.silly/objects &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run eval \
"test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>../../silly.log &&
git bisect reset
) &&
grep "$HASH3 is the first bad commit" silly.log
Cloning into bare repository bare.silly...
done.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for
git> into <hello>.
3de952f2416b6084f557ec417709eac740c6818c is the first bad commit
prev parent reply other threads:[~2011-08-09 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 2:11 [PATCH v3 1/1] bisect: add support for bisecting bare repositories Jon Seymour
2011-08-09 17:26 ` Junio C Hamano
2011-08-09 23:12 ` Jon Seymour [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=CAH3Anrr1eDuG9WNGb168ekMUnRcfEu4TPnGcSnh9TwLpvVMkBw@mail.gmail.com \
--to=jon.seymour@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jnareb@gmail.com \
--cc=jrnieder@gmail.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).