Re: [PATCH 2/3] blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Sep 18, 2010, 19:26 UTC
- Message-ID
- <vpq8w2yvonu.fsf@bauges.imag.fr>
- In-Reply-To
- <000c991c7a0673e26ee3ecc19ea3c8a7b437fecf.1284830388.git.kirr@landau.phys.spbu.ru>
Kirill Smelkov <kirr@landau.phys.spbu.ru> writes:
> Subject: Re: [PATCH 2/3] blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
We try to keep the subject lines short (<80 chars, and as much as possible less so that "git log --oneline" be pretty).
How about
blame,cat-file: add failing tests for --textconv on symlinks
> Because as described in previous patch - it should not.
Since the actual problem is exhibited here, I think it is the best place to actually describe it.
Show 5 quoted lines
> +test_expect_success 'make another new commit' ' > + echo "bin: test number 2" >three.bin && > + echo "bin: test number 2 version 2" >>three.bin && > + echo "bin: test number 2 version 3" >>three.bin && > + echo "bin: test number 3" >>three.bin &&
cat >three.bin <<EOF bin: test number 2 bin: test number 2 version 2 bin: test number 2 version 3 bin: test number 3 EOF
?
Show 6 quoted lines
> +cat >expected <<EOF > +(Number1 2010-01-01 18:00:00 +0000 1) converted: test number 2 > +(Number2 2010-01-01 20:00:00 +0000 2) converted: test number 2 version 2 > +(Number3 2010-01-01 22:00:00 +0000 3) converted: test number 2 version 3 > +(Number4 2010-01-01 23:00:00 +0000 4) converted: test number 3 > +EOF
These days, it's recommanded to put this kind of code within the test_expect_success/test_expect_failure.
> + > +echo -n "one.bin" >expected
echo -n is not very portable (and doesn't seem to be used in git's t/ directory). Better use
printf "%s" "one.bin" >expected
(again, within text_expect_failure if possible)
-- Matthieu Moy http://www-verimag.imag.fr/~moy/