Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-07-25 Thread Eric Sunshine
On Tue, Jul 24, 2018 at 6:17 PM brian m. carlson wrote: > On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote: > > Here's what I had envisioned when reading your emails about OID lookup > > table functionality: > > > > --- >8 --- > > test_oid_cache () { > > while read tag rest > >

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-07-24 Thread brian m. carlson
On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote: > Here's what I had envisioned when reading your emails about OID lookup > table functionality: > > --- >8 --- > test_detect_hash () { > test_hash_algo=... > } > > test_oid_cache () { > while read tag rest > do >

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-13 Thread brian m. carlson
On Tue, Jun 12, 2018 at 03:29:47AM -0400, Eric Sunshine wrote: > On Mon, Jun 11, 2018 at 9:05 PM, brian m. carlson > wrote: > > test_oid would be fine. One note is that this doesn't always produce > > OIDs; sometimes it will produce other values, but as long as you don't > > think that's too

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-12 Thread Eric Sunshine
On Mon, Jun 11, 2018 at 9:05 PM, brian m. carlson wrote: > On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote: >> The word "translate" is very generic and is (at least in my mind) >> strongly associated with i18n/l10n, so the name test_translate() may >> be confusing for readers.

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-11 Thread brian m. carlson
On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote: > On Mon, Jun 04, 2018 at 11:52:20PM +, brian m. carlson wrote: > > Add a test function helper, test_translate, that will produce its first > > argument if the hash in use is SHA-1 and the second if its argument is > > NewHash.

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-11 Thread Eric Sunshine
On Mon, Jun 04, 2018 at 11:52:20PM +, brian m. carlson wrote: > Add a test function helper, test_translate, that will produce its first > argument if the hash in use is SHA-1 and the second if its argument is > NewHash. Implement a mode that can read entries from a file as well for >

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-06 Thread Jeff King
On Thu, Jun 07, 2018 at 12:57:04AM +, brian m. carlson wrote: > > > Unless I'm wrong, we don't use the "local" keyword ? > > > > We've got a test balloon out; see 01d3a526ad (t: check whether the > > shell supports the "local" keyword, 2017-10-26). I think it's reasonable > > to consider

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-06 Thread brian m. carlson
On Wed, Jun 06, 2018 at 04:58:46PM -0400, Jeff King wrote: > On Wed, Jun 06, 2018 at 08:19:27AM +0200, Torsten Bögershausen wrote: > > > > +test_translate_f_ () { > > > + local file="$TEST_DIRECTORY/translate/$2" && > > > > Unless I'm wrong, we don't use the "local" keyword ? > > We've got a

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-06 Thread Jeff King
On Wed, Jun 06, 2018 at 08:19:27AM +0200, Torsten Bögershausen wrote: > > +test_translate_f_ () { > > + local file="$TEST_DIRECTORY/translate/$2" && > > Unless I'm wrong, we don't use the "local" keyword ? We've got a test balloon out; see 01d3a526ad (t: check whether the shell supports

Re: [PATCH 01/10] t: add tool to translate hash-related values

2018-06-06 Thread Torsten Bögershausen
Some style nite inline On Mon, Jun 04, 2018 at 11:52:20PM +, brian m. carlson wrote: > Add a test function helper, test_translate, that will produce its first > argument if the hash in use is SHA-1 and the second if its argument is > NewHash. Implement a mode that can read entries from a

[PATCH 01/10] t: add tool to translate hash-related values

2018-06-04 Thread brian m. carlson
Add a test function helper, test_translate, that will produce its first argument if the hash in use is SHA-1 and the second if its argument is NewHash. Implement a mode that can read entries from a file as well for reusability across tests. For the moment, use the length of the empty blob to