From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
git@vger.kernel.org, Greg KH <greg@kroah.com>,
Andrew Klossner <andrew@cesa.opbu.xerox.com>
Subject: Re: [PATCH] Use nonrelative paths instead of absolute paths for cloned repositories
Date: Fri, 06 Jun 2008 09:45:24 -0700 [thread overview]
Message-ID: <7viqwmv7ff.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0806060422310.21190@racer> (Johannes Schindelin's message of "Fri, 6 Jun 2008 04:23:01 +0100 (BST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Thu, 5 Jun 2008, Daniel Barkalow wrote:
>
>> Particularly for the "alternates" file, if one will be created, we want
>> a path that doesn't depend on the current directory, but we want to
>> retain any symlinks in the path as given and any in the user's view of
>> the current directory when the path was given.
>
> I have to say that I do not follow why the symlinks should be trusted any
> more than the absolute paths.
Thanks, Daniel.
I am obviously in favor of fixing this regression before 1.5.6, and the
introduction of make_nonrelative_path() for the use of clone alone is
probably the least impact and safe solution in the short term after -rc1.
In the longer term, we would inevitably face "when should one use
nonrelative and when should one use absolute?" and we would eventually
have to answer it. It may turn out that many current users of "absolute"
are better off using "nonrelative", but I suspect we won't get rid of
"absolute" completely, because one of the reasons it avoids symlinks at
great lengths is so that it can check the containment relationships
between paths reliably (e.g. "is this path outside the repository, in
which case we should refuse to add it to the index, and we use --no-index
without being asked when running "diff"").
But using "absolute" for containment comparison is one thing. Storing the
result of "absolute" is quite another.
We've already learned to love a similar crazyness somebody's system has on
this list. If you want to check if the user string is equivalent to a
path you stored in the filesystem, you compare them after normalizing and
that is a sensible approach. Storing path after normalizing, which would
be different form than what the user originally used to create, is not so
sane and leads to all sorts of pain. Ending up storing the output from
"absolute" in info/alternates is just like giving normalized sequence back
from readdir(3) on such a system.
next prev parent reply other threads:[~2008-06-06 16:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 3:15 [PATCH] Use nonrelative paths instead of absolute paths for cloned repositories Daniel Barkalow
2008-06-06 3:23 ` Johannes Schindelin
2008-06-06 3:47 ` Daniel Barkalow
2008-06-06 16:45 ` Junio C Hamano [this message]
2008-06-06 17:34 ` Johannes Schindelin
2008-06-06 18:07 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7viqwmv7ff.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=andrew@cesa.opbu.xerox.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=greg@kroah.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).