From: Jeff King <peff@peff•net>
To: David Turner <dturner@twopensource•com>
Cc: Junio C Hamano <gitster@pobox•com>,
git mailing list <git@vger•kernel.org>
Subject: Re: RFC: git cat-file --follow-symlinks?
Date: Wed, 29 Apr 2015 19:11:50 -0400 [thread overview]
Message-ID: <20150429231150.GB3887@peff.net> (raw)
In-Reply-To: <1430346576.14907.40.camel@ubuntu>
On Wed, Apr 29, 2015 at 03:29:36PM -0700, David Turner wrote:
> Overall, I agree. I think the disadvantages are somewhat overstated.
>
> As I said above, I don't think the cwd is a problem. The output for
> symlinks which point outside the repo should be absolute (in the case of
> absolute symlinks), or relative to the repo root (for relative
> symlinks). In other words, if my repo contains:
> foo/bar -> ../../baz
> then the output[1] would be
> symlink 6
> ../baz
>
> I can't think of any other output that would be reasonable here, but
> maybe there's something I don't understand.
Yeah, I agree if you let git punt on leaving the filesystem, most of the
complicated problems go away. It still feels a bit more magical than I
expect out of cat-file, and there are still corner cases (e.g., do we do
cycle detection? Or just have a limit to the recursion depth?)
And if you are punting on some cases, I think you'd still want to be
able to report on the symlinks you couldn't resolve (e.g., because they
went out of tree, pointed to non-existent files, or caused cycles). So
it seems like %(intreemode) is a good first step, because it lets you
express that (and more).
And then you could implement --follow-symlinks on top of that; it can't
catch all cases, but you've left callers with an escape hatch to do
their own resolution if they want, without having to implement a new
syntax for it.
-Peff
next prev parent reply other threads:[~2015-04-29 23:11 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 20:57 RFC: git cat-file --follow-symlinks? David Turner
2015-04-29 21:16 ` Jonathan Nieder
2015-04-29 21:24 ` David Turner
2015-04-29 21:17 ` Junio C Hamano
2015-04-29 21:30 ` David Turner
2015-04-29 21:48 ` Jeff King
2015-04-29 22:19 ` Jonathan Nieder
2015-04-29 23:05 ` Jeff King
2015-04-29 22:29 ` David Turner
2015-04-29 23:11 ` Jeff King [this message]
2015-04-30 0:37 ` Jeff King
2015-04-30 1:06 ` David Turner
2015-04-30 1:16 ` Jeff King
2015-04-30 1:31 ` Junio C Hamano
2015-04-30 3:18 ` Jeff King
2015-04-30 1:45 ` David Turner
2015-04-30 3:37 ` Jeff King
2015-04-30 5:34 ` Junio C Hamano
2015-04-30 8:12 ` Michael Haggerty
2015-04-30 18:03 ` David Turner
2015-04-30 18:19 ` Junio C Hamano
2015-04-30 18:28 ` David Turner
2015-04-30 18:32 ` Jeff King
2015-04-30 18:44 ` David Turner
2015-04-30 18:49 ` Jeff King
2015-04-30 19:00 ` David Turner
2015-04-30 19:10 ` Jeff King
2015-04-30 19:17 ` David Turner
2015-04-30 10:04 ` Andreas Schwab
2015-04-30 18:27 ` Jeff King
2015-04-30 19:18 ` Junio C Hamano
2015-04-30 19:25 ` David Turner
2015-04-30 19:46 ` Junio C Hamano
2015-04-30 19:51 ` Jeff King
2015-04-30 20:05 ` Junio C Hamano
2015-05-01 3:29 ` David Turner
2015-05-01 5:36 ` Jeff King
2015-05-01 17:29 ` David Turner
2015-05-01 20:11 ` Jeff King
2015-05-01 21:09 ` David Turner
2015-04-29 21:49 ` Junio C Hamano
2015-04-29 22:47 ` David Turner
2015-04-30 8:10 ` Michael Haggerty
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=20150429231150.GB3887@peff.net \
--to=peff@peff$(echo .)net \
--cc=dturner@twopensource$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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