git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 4/4] t/t8006: test textconv support for blame

From
DGDiane Gasselin <diane.gasselin@ensimag.imag.fr>
Date
Jun 4, 2010, 08:55 UTC
Message-ID
<AANLkTil7Y6PPkbmzuID4vY_fhEwvP4qa2UG5jC1qLtTG@mail.gmail.com>
In-Reply-To
<201006031744.07569.j6t@kdbg.org>
Le 3 juin 2010 17:44, Johannes Sixt <j6t@kdbg.org> a écrit :
Show 11 quoted lines
> On Donnerstag, 3. Juni 2010, Axel Bonnet wrote:
>> +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?
>

Ok. We don't use the intermediate file anymore. Actually, we used what has been done for textconv test for diff. I didn't find a way to directly specify the sed command as textconv command without using ./helper though.

cat >helper <<'EOF' #!/bin/sh sed 's/^/converted: /' "$@" EOF chmod +x helper

Show 7 quoted lines
>> +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?
>

At first, we wanted to test how links handle textconv but it behaves as regular file so the test is not really relevant. It will be deleted.

Show 14 quoted lines
>> +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.
>

We did the appropriate changes. Thanks a lot for your comments!

Diane
Show 6 quoted lines
> -- Hannes
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Johannes SixtNext: Matthieu Moy
Message 7 of 16 in “textconv support for blame”
  1. 0/4 textconv support for blameAxel Bonnet, Jun 3, 2010
  2. 1/4 textconv: make the API publicAxel Bonnet, Jun 3, 2010
  3. 2/4 textconv: make diff_options accessible from blameAxel Bonnet, Jun 3, 2010
  4. 3/4 textconv: support for blameAxel Bonnet, Jun 3, 2010
  5. 4/4 t/t8006: test textconv support for blameAxel Bonnet, Jun 3, 2010
  6. Johannes SixtJun 3, 2010
  7. Diane GasselinJun 4, 2010
  8. Matthieu MoyJun 4, 2010
  9. Matthieu MoyJun 4, 2010
  10. Junio C HamanoJun 4, 2010
  11. Diane GasselinJun 4, 2010
  12. Jeff KingJun 6, 2010
  13. Junio C HamanoJun 4, 2010
  14. Matthieu MoyJun 4, 2010
  15. bonnetaJun 4, 2010
  16. Matthieu MoyJun 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.