Re: [PATCH v2 1/1] trace2: write to directory targets

2019-03-22 Thread Jeff Hostetler
On 3/21/2019 11:30 PM, Junio C Hamano wrote: Jeff Hostetler writes: + for (attempt_count = 0; attempt_count < MAX_RANDOM_ATTEMPTS; attempt_count++) { + strbuf_reset(&final_path); + strbuf_addbuf(&final_path, &base_path); + strbuf_addf(&final_

Re: [PATCH v2 1/1] trace2: write to directory targets

2019-03-21 Thread Junio C Hamano
Jeff Hostetler writes: >>> + for (attempt_count = 0; attempt_count < MAX_RANDOM_ATTEMPTS; >>> attempt_count++) { >>> + strbuf_reset(&final_path); >>> + strbuf_addbuf(&final_path, &base_path); >>> + strbuf_addf(&final_path, ".%d", attempt_count); > > Since the last

Re: [PATCH v2 1/1] trace2: write to directory targets

2019-03-21 Thread Jeff Hostetler
On 3/20/2019 10:04 PM, Junio C Hamano wrote: Josh Steadmon writes: [...] +/* + * How many attempts we will make at creating a random trace output path. + */ +#define MAX_RANDOM_ATTEMPTS 10 With the updated design, randomness is no longer the primary property of this new feature. The fac

Re: [PATCH v2 1/1] trace2: write to directory targets

2019-03-20 Thread Junio C Hamano
Josh Steadmon writes: > diff --git a/t/t0210-trace2-normal.sh b/t/t0210-trace2-normal.sh > index 03a0aedb1d..26c9c1b3b8 100755 > --- a/t/t0210-trace2-normal.sh > +++ b/t/t0210-trace2-normal.sh > @@ -80,6 +80,21 @@ test_expect_success 'normal stream, return code 1' ' > test_cmp expect actual