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

Re: [PATCH] t7501: always use test_cmp instead of diff

From
Jeff King <peff@peff.net>
Date
Sep 9, 2008, 23:54 UTC
Message-ID
<20080909235414.GA4768@coredump.intra.peff.net>
In-Reply-To
<1221003666-17115-1-git-send-email-vmiklos@frugalware.org>
On Wed, Sep 10, 2008 at 01:41:06AM +0200, Miklos Vajna wrote:
>  test_expect_success \
>      'validate git-rev-list output.' \
> -    'diff current expected'
> +    'test_cmp current expected'
We seem to use the convention of
  test_cmp <expected> <actual>
elsewhere, rather than
  test_cmp <actual> <expected>

as you have here. Most noticeably, that means the diff will show deviations from expected, rather "what should be done to make this as expected". But it is also possible that in the future test_cmp could be enhanced to do something more interesting.

I don't think it is worth it to go fix all such instances, but while you are here...

-Peff
Previous: Miklos VajnaNext: Junio C Hamano
Message 3 of 5 in “t7501: always use test_cmp instead of diff”
  1. t7501: always use test_cmp instead of diffMiklos Vajna, Sep 9, 2008
  2. Miklos VajnaSep 9, 2008
  3. Jeff KingSep 9, 2008
  4. Junio C HamanoSep 10, 2008
  5. t7501: always use test_cmp instead of diffMiklos Vajna, Sep 10, 2008

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.