Re: [PATCH 05/10] t0064: make hash size independent

From
brian m. carlson <hidden>
Date
2018-06-12 01:09:07
Reply to
Eric Sunshine, 2018-06-11
On Mon, Jun 11, 2018 at 04:09:05AM -0400, Eric Sunshine wrote:
On Mon, Jun 4, 2018 at 7:52 PM, brian m. carlson
[off-list ref] wrote:
quoted
 test_expect_success 'lookup with almost duplicate values' '
+       # n-1 5s
+       root=$(test_translate 555555555555555555555555555555555555555 \
+               555555555555555555555555555555555555555555555555555555555555555) &&
This is rather unwieldy and ugly. How about simply re-using echoid()
to compute the value, like this:

    root=$(echoid "" 55) &&
    root=${root%5} &&

That is, use echoid() to generate the all-5's OID of correct length
and then chop the last '5' off the end.
Sure, that would be nicer.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachments

Thread (26 messages) 26 messages, 4 authors, last reply 2018-07-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help