Re: [PATCH v2 03/11] tests: at-combinations: improve nonsense()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 8, 2013, 05:55 UTC
- Message-ID
- <7v8v3qgglz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1367963711-8722-4-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 6 quoted lines
> In some circumstances 'git log' might fail, but not because the @ > parsing failed. For example: 'git rev-parse' might succeed and return a > bad object, and then 'git log' would fail. > > The layer we want to test is revision parsing, so let's test that > directly.
Hmph, but
git rev-parse Makefile
would happily succeed if there happens to be Makefile in the directory.
Are we expecting that they are always object names? If that is the case, perhaps
git rev-parse --verify "$1"
would express the intention better.
Show 19 quoted lines
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> t/t1508-at-combinations.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
> index bd2d2fe..2ea735e 100755
> --- a/t/t1508-at-combinations.sh
> +++ b/t/t1508-at-combinations.sh
> @@ -17,7 +17,7 @@ test_expect_${4:-success} "$1 = $3" "
> }
> nonsense() {
> test_expect_${2:-success} "$1 is nonsensical" "
> - test_must_fail git log -1 '$1'
> + test_must_fail git rev-parse '$1'
> "
> }
> fail() {