Subject: Re: RFC: git cat-file --follow-symlinks?

From: Jeff King <[email-masked]>
Date: Wed, 29 Apr 2015 19:05:43 -0400

On Wed, Apr 29, 2015 at 03:19:07PM -0700, Jonathan Nieder wrote:

> Jeff King wrote:
> 
> >   1. Git has to make a decision about what to do in corner cases. What
> >      is our cwd for relative links? The project root?
> 
> I don't follow.  Isn't symlink resolution always relative to the
> symlink, regardless of cwd?

Yeah, I was being silly to think this was a concern for intra-repository
links. It's well-defined there.  E.g., if "foo/bar/baz" points to
"../moof", that is just "foo/moof".

But if we leave the git tree the location of our root matters. E.g., if
"foo/bar/baz" points to "../../../../moof", where is that anchored in
the filesystem? So perhaps "cwd" is not the right term. It is really
"where are we pretending our working tree is".

-Peff