Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once
- From
Andrey Okoshkin <a.okoshkin@samsung.com>
- Date
- Oct 25, 2017, 10:49 UTC
- Message-ID
- <b92619c8-8ae1-1270-ba7e-bfd0afd3055f@samsung.com>
- In-Reply-To
- <CAGZ79kaSZG9WriqX0SLbTnEDRr-4YdFRuK17+9wnxyrftfnMmg@mail.gmail.com>
Thanks for your review.
24.10.2017 19:28, Stefan Beller wrote:
> So I think this function is never called from within a threaded environment > in git.
You are right, it's just a hypothetic case.
Show 12 quoted lines
> Despite not being in a threaded environment, I wonder if we want to > minimize the time between calling getenv and the use of the result, > i.e. declare merge_verbosity here, but assign it later, just before the > condition? > > (The compiler may shuffle stuff around anyway, so this is a > moot suggestion; It gears mostly towards making the code more > readable/maintainable when presenting this part of the code > to the user.) > > With or without this change: > Reviewed-by: Stefan Beller <sbeller@google.com>
Yes, in current situation it's more for readability. And I'll make the usage of merge_verbosity just after the assignment.
-- Best regards, Andrey Okoshkin