Re: [PATCH] daemon, path.c: fix a bug with ~ in repo paths
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 19, 2016, 14:12 UTC
- Message-ID
- <CACsJy8AzWqJ_9JQ_BGnAB3E3GrGSTS40z8umbtO6mQJukWOooQ@mail.gmail.com>
- In-Reply-To
- <87pomxildc.wl-lukeshu@sbcglobal.net>
On Wed, Oct 19, 2016 at 1:05 AM, Luke Shumaker <lukeshu@sbcglobal.net> wrote:
Show 7 quoted lines
>> I am not sure if it is even a bug. As you can easily lose that >> tilde that appears in front of subdirectory of /srv/git/ or replace >> it with something else (e.g. "u/"), this smells like "Don't do it if >> it hurts" thing to me. > > I buy into "Don't do it if it hurts", but that doesn't mean it's not a > bug on an uncommon edge-case.
The amount of changes is unbelievable for fixing such a rare case though. I wonder if we can just detect this in daemon.c and pass "./~foo/bar" instead of "~foo/bar" to enter_repo() in non-strict mode to "disable" expand_user_path(). If it works, it's much simpler changes (even though a bit hacky)
-- Duy