git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] rev-parse: add option for absolute or relative path formatting
Date: Thu, 5 Nov 2020 16:51:10 -0800
Message-ID: <20201106005110.GA3479573@google.com> (raw)
In-Reply-To: <20201105031153.GA1332931@camp.crustytoothpaste.net>

brian m. carlson wrote:
> On 2020-11-04 at 22:16:59, Jonathan Nieder wrote:
> > brian m. carlson wrote:

>>> This impetus for this patch is Git LFS, which is written in Go.  Go
>>> lacks a cross-platform way to canonicalize paths in the same way that
>>> Git does, so when Git produces relative paths, such as in some cases
>>> with --git-common-dir, we end up with problems when users are doing
>>> things with unusual paths on Windows, such as when using SUBST
[...]
>> Can you describe the user-facing symptom?  While reviewing
>> https://lore.kernel.org/git/20201009191511.267461-1-sandals@crustytoothpaste.net/
>> I'm trying to understand the motivation and I'm getting stuck at
>> trying to understand the basics of the problem being solved.
[...]
> The goal is to resolve paths the way Git does and allow verify that a
> path is within the repository.

Ah, thank you.  So if I am understanding the above and [1] correctly,
this means:

- when a path is within a repository, converting it to a path relative
  to the repository root

- when a path is not within a repository, learning so

and that making relative paths with ../../ portion that exits the
repository is *not* an important part of this use case (though it
could be useful for other things).

[...]
> This is also generally applicable for scripting, where realpath(1) is
> not always available (e.g., on macOS), but mostly this is here to make
> Windows work more nicely, since it has more complex path functionality.

Thanks much.  I think this tells me enough to understand the series.

Sincerely,
Jonathan

[1] https://github.com/git-lfs/git-lfs/issues/4012 --- thanks to Emily
for the pointer in [2].
[2] https://lore.kernel.org/git/20201104230157.GH2774782@google.com/

  reply	other threads:[~2020-11-06  0:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 18:50 brian m. carlson
2020-09-09  3:23 ` Johannes Schindelin
2020-09-09 22:31   ` brian m. carlson
2020-09-09 14:51 ` SZEDER Gábor
2020-09-09 22:23   ` brian m. carlson
2020-09-10 15:19     ` SZEDER Gábor
2020-09-11  0:03       ` brian m. carlson
2020-11-04 22:16 ` Jonathan Nieder
2020-11-05  3:11   ` brian m. carlson
2020-11-06  0:51     ` Jonathan Nieder [this message]
2020-11-06  1:57       ` brian m. carlson

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201106005110.GA3479573@google.com \
    --to=jrnieder@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git