Re: [PATCH] tests: test applying criss-cross rename patch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2009, 07:08 UTC
- Message-ID
- <7viqkya3hq.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <81b0412b0904200711p66ea2500s7cc5894aba71f641@mail.gmail.com>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 17 quoted lines
> 2009/4/11 Michał Kiedrowicz <michal.kiedrowicz@gmail.com>: >> +test_expect_success 'criss-cross rename' ' >> + mv file1 tmp && >> + mv file2 file1 && >> + mv tmp file2 >> +' >> + >> +test_expect_success 'diff -M -B' ' >> + git diff -M -B > diff && >> + git reset --hard >> + >> +' > > This cannot work on systems where ctime is not trusted: > git diff will produce no data, as there are no changes in > metadata (the files are of the same size). Either make > the file sizes different or add a "touch file1 file2".
You seem to be saying that we still have a racy-git bug somewhere. Is your statement from an actual experience or a speculation? If the former we have a bug to kill, not a workaround to avoid the issue in this test.
Show 15 quoted lines
>
> diff --git a/t/t4130-apply-criss-cross-rename.sh
> b/t/t4130-apply-criss-cross-rename.sh
> index 8623dbe..1ff049a 100755
> --- a/t/t4130-apply-criss-cross-rename.sh
> +++ b/t/t4130-apply-criss-cross-rename.sh
> @@ -14,7 +14,7 @@ create_file() {
>
> test_expect_success 'setup' '
> create_file file1 "File1 contents" &&
> - create_file file2 "File2 contents" &&
> + create_file file2 "Contents of File2" &&
> git add file1 file2 &&
> git commit -m 1
> '