git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] diff --no-index: optionally follow symlinks
Date: Sat, 25 Mar 2017 20:42:51 -0700	[thread overview]
Message-ID: <CAPc5daV-12U2mNcvfXmy4UmYnEm2UQWGWPUX7EO3Uc15e1D-VQ@mail.gmail.com> (raw)
In-Reply-To: <1490477422.29662.3.camel@kaarsemaker.net>

On Sat, Mar 25, 2017 at 2:30 PM, Dennis Kaarsemaker
<dennis@kaarsemaker.net> wrote:
>
>>  - does this code do a reasonable thing when the path is a symbolic
>>    link that points at a directory?  what does it mean to grab
>>    st.st_size for such a thing (and then go on to open() and xmmap()
>>    it)?
>
> No, it does something entirely unreasonable. I hadn't even thought of
> testing with symlinks to directories, as my ulterior motive was the
> next commit that makes it work with pipes. This will be fixed.

To be quite honest, I do not mind it if the "toplevel pipe that came from the
command line is treated as if it were a regular file" was the only change in
this series, without doing anything for symbolic links. I do not use the
process substitution myself, but I can see why sometimes it is handy to
pass two process invocations on the command line of "diff" (if it were only
one, then "-" with the usual redirection already works, but you cannot do
two command using that syntax).

Perhaps we can have only that part and perfect it first and have it ready for
the next release, postponing the symlink dereferencing, which is a different
issue?

  reply	other threads:[~2017-03-26  3:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 21:31 [PATCH v4 0/2] diff --no-index: support symlinks and pipes Dennis Kaarsemaker
2017-03-24 21:31 ` [PATCH v4 1/2] diff --no-index: optionally follow symlinks Dennis Kaarsemaker
2017-03-24 22:56   ` Junio C Hamano
2017-03-25 21:30     ` Dennis Kaarsemaker
2017-03-26  3:42       ` Junio C Hamano [this message]
2017-03-24 21:31 ` [PATCH v4 2/2] diff --no-index: support reading from pipes Dennis Kaarsemaker

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=CAPc5daV-12U2mNcvfXmy4UmYnEm2UQWGWPUX7EO3Uc15e1D-VQ@mail.gmail.com \
    --to=gitster@pobox.com \
    --cc=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).