Re: [RFC/PATCH 4/4] t/t8006: test textconv support for blame
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jun 3, 2010, 15:44 UTC
- Message-ID
- <201006031744.07569.j6t@kdbg.org>
- In-Reply-To
- <1275562038-7468-5-git-send-email-axel.bonnet@ensimag.imag.fr>
On Donnerstag, 3. Juni 2010, Axel Bonnet wrote:
Show 5 quoted lines
> +cat >helper <<'EOF' > +#!/bin/sh > +sed 's/^/converted: /' "$@" >helper.out > +cat helper.out > +EOF
You don't need an intermediate file here, do you? Without it, this textconv script is a one-liner; now, isn't it possible to configure a shell command as textconv command, i.e., without this helper script?
> +test_expect_success 'setup ' ' > + echo test 1 >one.bin && > + echo test number 2 >two.bin && > + ln one.bin link.bin &&
Do you need a hard link? Can't you just copy the file at the right time?
> +test_expect_success 'blame with --no-textconv' ' > + git blame --no-textconv one.bin | grep Number2 >blame > + find_blame <blame >result
It would be nice if you could write this like, e.g.,
git blame --no-textconv one.bin >blame && find_blame Number2 <blame >result
so that the git command is not part of a pipeline (otherwise, unexpected exit codes would go undetected).
Please look for missing '&&', you forgot it in many places.
-- Hannes