From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] Add a test for git-rerere
Date: Wed, 20 Dec 2006 10:37:47 -0800 [thread overview]
Message-ID: <7v4prqfm6c.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0612201737190.19693@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Wed, 20 Dec 2006 17:37:45 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> +cat > a1 << EOF
> +Whether 'tis nobler in the mind to suffer
> +The slings and arrows of outrageous fortune,
> +Or to take arms against a sea of troubles,
> +And by opposing end them? To die: to sleep;
> +No more; and by a sleep to say we end
> +The heart-ache and the thousand natural shocks
> +That flesh is heir to, 'tis a consummation
> +Devoutly to be wish'd.
> +EOF
This is out of copyright protection long time ago, so it would
be fine to use in example ;-).
> +sha1=4f58849a60b4f969a2848966b6d02893b783e8fb
> +rr=.git/rr-cache/$sha1
> +test_expect_success 'recorded preimage' "grep ======= $rr/preimage"
> +
> +test_expect_success 'no postimage or thisimage yet' \
> + "test ! -f $rr/postimage -a ! -f $rr/thisimage"
I am worried that this test specifies the behaviour a bit too
precisely. It is not t0000 basic where we want bit-for-bit
match with the expected result. Wouldn't this test break when
you further improve xdl_merge, for example?
> +rm $rr/postimage
> +echo -ne "$sha1\ta1\0" > .git/rr-cache/MERGE_RR
Hmmmmmm. I've stayed away from "echo -e" so far...
> +sha2=4000000000000000000000000000000000000000
> +rr2=.git/rr-cache/$sha2
> +mkdir $rr2
> +echo Hello > $rr2/preimage
Collisions are not so likely and perhaps we do not care.
> +case "$(date -d @11111111 +%s 2>/dev/null)" in
> +[1-9]*)
> + # it is a recent GNU date. good.
> + now=$(date +%s)
> + let almost_15_days_ago=$now+60-15*86400
> + let just_over_15_days_ago=$now-1-15*86400
> + let almost_60_days_ago=$now+60-60*86400
> + let just_over_60_days_ago=$now-1-60*86400
Hmmmmm. I've stayed away from "let" so far as well...
next prev parent reply other threads:[~2006-12-20 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 16:37 [PATCH 2/3] Add a test for git-rerere Johannes Schindelin
2006-12-20 18:37 ` Junio C Hamano [this message]
2006-12-21 8:34 ` Johannes Schindelin
2006-12-21 8:41 ` Junio C Hamano
2006-12-21 9:21 ` [PATCH] " Johannes Schindelin
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=7v4prqfm6c.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--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.
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).