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

Re: [BUG] git_path() returns relative paths

From
Duy Nguyen <pclouds@gmail.com>
Date
Jul 27, 2013, 12:47 UTC
Message-ID
<CACsJy8C5Du8zcqVeN7EGuyUxgSZaRq-X8y_hQvqQedYWfP8p+A@mail.gmail.com>
In-Reply-To
<CALkWK0kBesC2=kyygMCt61Fm5GGqX+yF6sbkCRcGYZ=ovgtTAQ@mail.gmail.com>

On Sat, Jul 27, 2013 at 7:31 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 12 quoted lines
> Ramkumar Ramachandra wrote:
>> e02ca72 (path.c: refactor relative_path(), not only strip prefix,
>> 2013-06-25) is the offender.
>
> The problem is the callsite in setup.c:setup_work_tree(). When
> relative_path() is called with
> "/home/artagnon/dotfiles/.git/modules/.elisp/flx" and
> "/home/artagnon/dotfiles/.elisp/flx" as the first and second
> arguments, it sets sb to "../../.git/modules/.elisp/flx".
>
> Makes me wonder why setup_git_dir() doesn't just use git_dir; why does
> it need a relative path at all?

044bbbc (Make git_dir a path relative to work_tree in setup_work_tree() - 2008-06-19)

-- 
Duy
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 5 of 18 in “[BUG] git_path() returns relative paths”
  1. Ramkumar RamachandraJul 27, 2013
  2. Duy NguyenJul 27, 2013
  3. Ramkumar RamachandraJul 27, 2013
  4. Ramkumar RamachandraJul 27, 2013
  5. Duy NguyenJul 27, 2013
  6. Ramkumar RamachandraJul 27, 2013
  7. Duy NguyenJul 27, 2013
  8. Ramkumar RamachandraJul 27, 2013
  9. Jiang XinJul 27, 2013
  10. Ramkumar RamachandraJul 28, 2013
  11. Duy NguyenJul 28, 2013
  12. Ramkumar RamachandraJul 28, 2013
  13. Duy NguyenJul 28, 2013
  14. Ramkumar RamachandraJul 28, 2013
  15. Duy NguyenJul 28, 2013
  16. Ramkumar RamachandraJul 28, 2013
  17. Fredrik GustafssonJul 27, 2013
  18. Ramkumar RamachandraJul 27, 2013

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.