Re: [PATCH] worktree: avoid dead-code in conditional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux