Re: [RFC/PATCH 3/3] builtin/show.c: do not prune by pathspec
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Mar 31, 2011, 12:50 UTC
- Message-ID
- <AANLkTik4wy3B1S=7_2opLdAVy5LBq55VsfZnkj0=QskC@mail.gmail.com>
- In-Reply-To
- <3bee7fb376e2fb498c9634ab2ff5506f8c74a7bc.1301562936.git.git@drmicha.warpmail.net>
I suggest add "commit" to the subject: do not prune commit by pathspec. Diff limiting is another kind of pruning and I was confused.
On Thu, Mar 31, 2011 at 4:17 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> By design, "git show commit -- path" is not "git show commit:path", and > there is no reason to change that.
Even more true, now that "path" can be "*.sh".
Show 8 quoted lines
> But "git show commit -- path" simply > returns nothing at all "most of the time" because it prunes by pathspec > even though it does not walk commits. This is pretty useless. > > So, turn off pruning (but keep diff limiting of course) so that "git > show commit -- path" shows the commit message and the diff that the > commit introduces to path (filtered by path); only the diff will be > empty "most of the time".
Tests please?
> As an intended side effect, users mistaking "git show commit -- path" > for "git show commit:path" are automatically reminded that they asked > git to show a commit, not a blob.
Nor a tree. I don't really see how "git show commit:path" and "git how commit -- path" are relevant for it to be mentioned here.
-- Duy