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

Re: [PATCH] [GSOC] cat-file: fix --batch report changed-type bug

From
ZheNing Hu <adlternative@gmail.com>
Date
Jun 1, 2021, 12:46 UTC
Message-ID
<CAOLTT8SZxiBtxj7=B-75gVghZAp-qf_oqFGwyi7iKD61uH-vsw@mail.gmail.com>
In-Reply-To
<YLWSRBJHiph+Bejo@coredump.intra.peff.net>
Jeff King <peff@peff.net> 于2021年6月1日周二 上午9:49写道:
Show 16 quoted lines
>
> Or we could just generate the entire expected output and check it with
> "cmp". The most robust way is probably to loop over the objects, running
> "git cat-file" for each, but that's slow. Maybe:
>
>   git cat-file --batch-all-objects --batch-check='%(objectname)' >objects &&
>   git cat-file --batch='%(objectname)' <objects >expect &&
>   git cat-file --batch-all-objects --batch='%(objectname)' >actual &&
>   # not test_cmp, as it is not binary clean!
>   cmp expect actual
>
> That feels a bit circular in that it's mostly just exercising most of
> the same code in the "expect" and "actual" paths. The interesting part
> is the combination of the two options, which is why I think that just
> making sure we don't hit an error might be enough.
>
Such a test is also acceptable. I will add a test like this.
> -Peff

-- ZheNing Hu

Previous: Felipe ContrerasNext: Junio C Hamano
Message 11 of 15 in “[GSOC] cat-file: fix --batch report changed-type bug”
  1. [GSOC] cat-file: fix --batch report changed-type bugZheNing Hu via GitGitGadget, May 30, 2021
  2. Jeff KingMay 30, 2021
  3. ZheNing HuMay 31, 2021
  4. Jeff KingMay 31, 2021
  5. ZheNing HuMay 31, 2021
  6. Felipe ContrerasMay 31, 2021
  7. Jeff KingJun 1, 2021
  8. Felipe ContrerasJun 1, 2021
  9. Jeff KingJun 1, 2021
  10. Felipe ContrerasJun 1, 2021
  11. ZheNing HuJun 1, 2021
  12. Junio C HamanoMay 30, 2021
  13. Jeff KingMay 30, 2021
  14. Junio C HamanoJun 1, 2021
  15. ZheNing HuMay 31, 2021

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.