Re: [PATCH 2/5] Add platform-independent .git "symlink"
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Feb 18, 2008, 13:34 UTC
- Message-ID
- <fpc1hd$ror$1@ger.gmane.org>
- In-Reply-To
- <8c5c35580802180518x5c392bddya21c48ea4db9a7cd@mail.gmail.com>
Lars Hjemli wrote:
Show 26 quoted lines
> On Feb 18, 2008 1:34 PM, Johannes Schindelin wrote:
>> On Mon, 18 Feb 2008, Lars Hjemli wrote:
>>
>> > diff --git a/environment.c b/environment.c
>> > index 3527f16..8058e7b 100644
>> > --- a/environment.c
>> > +++ b/environment.c
>> > @@ -49,6 +49,8 @@ static void setup_git_env(void)
>> > {
>> > git_dir = getenv(GIT_DIR_ENVIRONMENT);
>> > if (!git_dir)
>> > + git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
>> > + if (!git_dir)
>> > git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
>>
>> I still maintain that the code (maybe not the diff) is easier to read like
>> this:
>>
>> if (!git_dir) {
>> git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
>> if (!git_dir)
>> git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
>> }
>
> IMHO such constructs are butt ugly, but if there's consensus for your
> way, I'll abide...I prefer the original variant. It is IMHO no less, and perhaps even more readable, and it is not soo deeply nested.
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git