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

Re: [PATCH 2/3] t: add t0016-oidmap.sh

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 14, 2019, 10:36 UTC
Message-ID
<CAP8UFD3Q2rQwq82LNSXuLSEUMHABVJVgy8UJ7Fvgxug1rZGMFQ@mail.gmail.com>
In-Reply-To
<xmqqh88tunvt.fsf@gitster-ct.c.googlers.com>
On Fri, Jun 14, 2019 at 12:22 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
>
> Jeff King <peff@peff.net> writes:
>
> >> > I know there are testing philosophies that go to this level of
> >> > white-box testing, but I don't think we usually do in Git. A unit
> >> > test of oidmap's externally visible behavior seems like the right
> >> > level to me.
> >>
> >> That's a good point...  but then why does 't0011-hashmap.sh' do it in
> >> the first place?  As far as I understood this t0016 mainly follows
> >> suit of t0011.
> >
> > I'd make the same argument against t0011. :)
>
> Yeah, I tend to agree.  It is not a good excuse that somebody else
> alerady has made a mistake.

Ok, I will remove the "hash" test in t0016 and the corresponding code in test-oidmap.c.

Show 6 quoted lines
> > I think there it at least made a little more sense because we truly are
> > hashing ourselves, rather than just copying out some sha1 bytes. But I
> > think I'd still argue that if I updated strhash() to use a different
> > hash, I should not have to be updating t0011 to change out the hashes.
>
> True, too.

I will also send an additional patch to remove similar code in t00161 and test-hashmap.c.

Previous: Junio C HamanoNext: Christian Couder
Message 13 of 14 in “Test oidmap”
  1. 0/3 Test oidmapChristian Couder, Jun 9, 2019
  2. 1/3 t/helper: add test-oidmap.cChristian Couder, Jun 9, 2019
  3. 2/3 t: add t0016-oidmap.shChristian Couder, Jun 9, 2019
  4. SZEDER GáborJun 9, 2019
  5. Christian CouderJun 9, 2019
  6. SZEDER GáborJun 9, 2019
  7. Christian CouderJun 9, 2019
  8. Junio C HamanoJun 10, 2019
  9. Jeff KingJun 13, 2019
  10. SZEDER GáborJun 13, 2019
  11. Jeff KingJun 13, 2019
  12. Junio C HamanoJun 13, 2019
  13. Christian CouderJun 14, 2019
  14. 3/3 oidmap: use sha1hash() instead of static hash() functionChristian Couder, Jun 9, 2019

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.