git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Luke ShumakerNext: Junio C Hamano
Message 4 of 7 in “daemon, path.c: fix a bug with ~ in repo paths”
  1. daemon, path.c: fix a bug with ~ in repo pathsLuke Shumaker, Oct 18, 2016
  2. Junio C HamanoOct 18, 2016
  3. Luke ShumakerOct 18, 2016
  4. Duy NguyenOct 19, 2016
  5. Junio C HamanoOct 21, 2016
  6. Junio C HamanoOct 21, 2016
  7. Jeff KingOct 22, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.