git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Robert Dailey <rcdailey.lists@gmail.com>, Git <git@vger.kernel.org>
Subject: Re: diff.renames not working?
Date: Mon, 16 Sep 2019 10:35:40 -0700	[thread overview]
Message-ID: <xmqqlfuob0ur.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190914033017.GA30458@sigill.intra.peff.net> (Jeff King's message of "Fri, 13 Sep 2019 23:30:17 -0400")

Jeff King <peff@peff.net> writes:

>   - a way to independently specify the source pathspec and the
>     output-limiting pathspec. This is a cheaper version of the one
>     above, where you could look at a subset of the tree a sources, but
>     limit the set of shown paths even further. It's not conceptually
>     that difficult, but syntactically it gets weird since you have two
>     lists of pathspecs on the command-line.

Yes, the pathspec has always been input limiter and I think we have
discussed adding separate output limiter from time to time, but
nothing has happened.

Back in the scripted porcelain days, it would conceptually have been
simpler and cleaner, as you probably would run "diff-tree --raw"
with no (or "input") pathspec, filter its output with "output"
pathspec, and then convert the raw diff to a patch ( we used to have
such a filter, before we gave the -p option to all three "diff"
family backends).

Introducing an option to say "Pretend as if the system supported
output pathspec, and use the pathspec as such, without any input
pathspec" feels like a dirty hack compared to conceptual purity of
having two separate sets, and having to run without any input
pathspec may not be usable in truly large project, but I suspect it
may be good enough for most people (i.e. your "first one" that
wouldn't be too hard).  I am not sure if I like it, though X-<.

>> ```
>> git diff --follow master...topic -- ZPay/ZPayClient.hpp
>> ```
>
> So yes, that does work, and is why I added the "(clean)" qualifier
> above. It behaves like the "-C -C -C" I proposed. But the fact that it
> does so is entirely accidental. What happens is this:

I am kinda surprised that "diff" gets affected by "--follow" (I knew
that the command line parser would take that option meant for "log"
family without complaining) at all.

      parent reply	other threads:[~2019-09-16 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 20:24 diff.renames not working? Robert Dailey
2019-09-13 22:36 ` Bryan Turner
2019-09-14  3:30 ` Jeff King
2019-09-16 14:25   ` Robert Dailey
2019-09-16 17:35   ` Junio C Hamano [this message]

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=xmqqlfuob0ur.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rcdailey.lists@gmail.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.
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).