From: Junio C Hamano Date: Thu, 25 Jun 2020 00:38:18 GMT Subject: Re: [PATCH] worktree: avoid dead-code in conditional Message-ID: In-Reply-To: Eric Sunshine writes: > Callers of get_git_common_dir() aren't forced to care. But after > applying strbuf_add_absolute_path() we are forced to care. This is the > result of get_git_common_dir() for the three cases: > > . (within bare repo) > .git (within any worktree) > . (within .git) > > After applying strbuf_add_absolute_path(), we get: > > /whatever/proj.git/. (within bare proj) > /whatever/proj/.git (within any worktree) > /whatever/proj/.git/. (within .git) OK, but the point still stands. Shouldn't strbuf_add_absolute_path() be what we want to normalize? > Your puzzlement may arise from the misunderstanding regarding > get_git_common_dir() vs. strbuf_add_absolute_path()? Yes, exactly. Thanks.