From: Jonathan Nieder <jrnieder@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/3] t3404: preserve test_tick state across short SHA-1 collision test
Date: Sat, 24 Aug 2013 22:55:50 -0700 [thread overview]
Message-ID: <20130825055550.GN2882@elie.Belkin> (raw)
In-Reply-To: <1377112378-45511-2-git-send-email-sunshine@sunshineco.com>
Hi,
Eric Sunshine wrote:
> The short SHA-1 collision test requires carefully crafted commits in
> order to ensure a collision at rebase time.
Yeah, this breaks the usual rule that tests should be independent
of hashing function. But it's the best we can do, I think.
[...]
> --- a/t/t3404-rebase-interactive.sh
> +++ b/t/t3404-rebase-interactive.sh
> @@ -994,17 +994,23 @@ test_expect_success 'short SHA-1 setup' '
> test_when_finished "git checkout master" &&
> git checkout --orphan collide &&
> git rm -rf . &&
> + (
> unset test_tick &&
> test_commit collide1 collide &&
> test_commit --notick collide2 collide &&
> test_commit --notick "collide3 115158b5" collide collide3 collide3
> + )
Would be clearer if the code in a subshell were indented:
(
unset test_tick &&
test_commit ...
)
[...]
> test_expect_success 'short SHA-1 collide' '
> test_when_finished "reset_rebase && git checkout master" &&
> git checkout collide &&
> + (
> + unset test_tick &&
> + test_tick &&
> FAKE_COMMIT_MESSAGE="collide2 815200e" \
> FAKE_LINES="reword 1 2" git rebase -i HEAD~2
> + )
Likewise.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2013-08-25 5:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 19:12 [PATCH 0/3] t3404 incremental improvements Eric Sunshine
2013-08-21 19:12 ` [PATCH 1/3] t3404: preserve test_tick state across short SHA-1 collision test Eric Sunshine
2013-08-25 5:55 ` Jonathan Nieder [this message]
2013-08-25 7:53 ` Eric Sunshine
2013-08-25 8:53 ` Jonathan Nieder
2013-08-26 5:29 ` Junio C Hamano
2013-08-21 19:12 ` [PATCH 2/3] t3404: make tests more self-contained Eric Sunshine
2013-08-21 23:27 ` Junio C Hamano
2013-08-21 19:12 ` [PATCH 3/3] t3404: simplify short SHA-1 collision test Eric Sunshine
2013-08-21 23:25 ` [PATCH 0/3] t3404 incremental improvements Junio C Hamano
2013-08-22 18:17 ` Eric Sunshine
2013-08-22 19:02 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130825055550.GN2882@elie.Belkin \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).