Re: [PATCH] worktree: avoid dead-code in conditional
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 13 quoted lines
> 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()?