Re: [BUG] git_path() returns relative paths
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jul 27, 2013, 12:31 UTC
- Message-ID
- <CALkWK0kBesC2=kyygMCt61Fm5GGqX+yF6sbkCRcGYZ=ovgtTAQ@mail.gmail.com>
- In-Reply-To
- <CALkWK0k-23rTohYvNWP_XbuUCSGUE+G_e_7cBbPP5C9OzsJ4XQ@mail.gmail.com>
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?