git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@ucw.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	GIT Mailing List <git@vger.kernel.org>
Subject: Re: Problem with cg-diff <file>
Date: Sun, 29 May 2005 17:19:09 -0700	[thread overview]
Message-ID: <7vis11ftvm.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20050529233840.GY1036@pasky.ji.cz> (Petr Baudis's message of "Mon, 30 May 2005 01:38:40 +0200")

>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:

PB> ... git-diff-tree (in contrast to
PB> git-diff-cache) won't take the pathspec as its trailing arguments,

PB> Junio, is there any specific reason for that, or is the end of
PB> git-diff-tree argument list the right spot for the pathspec stuff?

Baffled.  Are you at Linus tip?

Linus correctly decided that diff-tree does not have to call
diffcore_pathspec(), which may be what confused you to make the
comment "... in contrast to git-diff-cache) won't take ...".
But it does not call it only because it does not need to.  It
filters the filepairs itself on the input side using the
trailing arguments; since diffcore_pathspec filters as the first
one in the chain as the input filter, calling it from diff-tree
would not cull anything further.

Here is what I am getting from the Linus tip binary, between my
HEAD and Linus tip:

$ git-diff-tree -r linus HEAD   >.all    ;# everything
$ git-diff-tree -r linus HEAD t >.t-only ;# limiting to the test suite
$ wc -l .all .t-only                     ;# count results
  12 .all
   3 .t-only
  15 total
$ cat .t-only				 ;# show what's in "t" output
:100644 100644 a51985518251f6c3f677438c3cb51b9716c20296 5ac29d1f98438d3530bbc8b0bdaced58200aca37 M	t/t4005-diff-rename-2.sh
:100644 100644 518892b90c7cbb3fb193d6bfb622046aff0f4431 76ae7201f0d19b7933ca44958b7c468193ec9778 M	t/t4007-rename-3.sh
:000000 100755 0000000000000000000000000000000000000000 01d276692669f2241471b8ad611b17d51e2a98ab N	t/t4009-diff-rename-4.sh
$ head -n 1 .all                         ;# prove that "t" filtered. 
:100644 100644 f85a605f0a336f506cf5cf46476a43e4c56b3e66 1d92a01a02543e55d0feb3541ee594fbc638136c M	Documentation/diff-format.txt


  reply	other threads:[~2005-05-30  0:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-29 23:15 Problem with cg-diff <file> Marcel Holtmann
2005-05-29 23:38 ` Petr Baudis
2005-05-30  0:19   ` Junio C Hamano [this message]
2005-05-30  0:32     ` Petr Baudis
2005-05-30  7:54       ` Junio C Hamano
2005-05-30  8:36         ` Petr Baudis

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=7vis11ftvm.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pasky@ucw.cz \
    /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).