Re: [PATCH v4] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-31 Thread Junio C Hamano
Andrey Okoshkin writes: > I think, the main benefits are: > * Code is more readable, no duplicated calls with the same constant string > argument. > * Code is potentially safer, the second getenv() call may return another > pointer value which could be NULL (and yes, this is an arguable point as

Re: [PATCH v4] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-31 Thread Andrey Okoshkin
31.10.2017 05:26, Junio C Hamano wrote: > Junio C Hamano writes: > >> That holds true for the code before or after this patch equally. In >> other words, that sounds like a justification for rejecting this >> patch (i.e. explanation of why this change is not needed). >> >> If we are worried abou

Re: [PATCH v4] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-30 Thread Junio C Hamano
Junio C Hamano writes: > That holds true for the code before or after this patch equally. In > other words, that sounds like a justification for rejecting this > patch (i.e. explanation of why this change is not needed). > > If we are worried about another thread calling these functions after >

Re: [PATCH v4] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-30 Thread Junio C Hamano
Andrey Okoshkin writes: > Get 'GIT_MERGE_VERBOSITY' environment variable only once in > init_merge_options() and store the pointer to its value for the further check. OK, that is "what this thing does" description. > No intervening calls to getenv(), putenv(), setenv() or unsetenv() are done >