All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Quick description of possible gitattributes system
Date: Sat, 03 Mar 2007 05:11:26 -0800	[thread overview]
Message-ID: <7vlkiebhfl.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0703020850470.3953@woody.linux-foundation.org> (Linus Torvalds's message of "Fri, 2 Mar 2007 08:58:24 -0800 (PST)")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Fri, 2 Mar 2007, Jakub Narebski wrote:
>
>> Andy Parkins wrote:
>> 
>> > + - prettyfilter
>> > +   Run by git-cat-file or git-show when content is being pretty-printed
>> > +   for display to the user.  If no prettyfilter is set, then it should
>> > +   default to outfilter.
>> 
>> I'd rather have plumbing operate without filters (if it is possible),
>> so git-cat-file would not run prettyfilter, and git-show would run it.
>
> That really sucks. I do "git show xyz > filname" all the time, and while 
> it's been about diffs and commits, I could imagine doing the same thing 
> for things like "git show v2.6.17:Documentation/logo.gif > some.gif" too.
>
> Yes, I know could do "git cat-file -p .." instead, but since we added "git 
> show", and made it do the Right Thing (tm) for blobs, I've come to use it 
> more (which is as it should be: "cat-file" is low-level plumbing, while 
> "git show" is what you'd expect users to use.
>
> So I really think that the issue here is that the *pager* should do the 
> right thing...

Sorry, but I do not think that would work because of the way we
setup our pager.  The original process turns into the PAGER and
child ships the data to it.

	$ git show -s master maint :t/test4012.png

I do not particularly think the prettyfilter is useful in
practice (it was just a fun toy I did to convince me that I can
use it for things other than input/output munging), but at least
we could make it a bit more usable by this, on top of 'pu':

diff --git a/builtin-log.c b/builtin-log.c
index 86062d3..bc26358 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -116,7 +116,7 @@ static int show_object(const unsigned char *sha1, const char *path, int nohead)
 	if (size <= offset)
 		goto finish;
 
-	if (path) {
+	if (pager_in_use && path) {
 		const struct pathattr *a = pathattr_lookup(path);
 		if (a && a->pretty) {
 			pretty = a->pretty;

  parent reply	other threads:[~2007-03-03 13:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01 12:06 [PATCH] Quick description of possible gitattributes system Andy Parkins
2007-03-01 16:06 ` Brian Gernhardt
2007-03-02 12:00   ` Andy Parkins
2007-03-02 18:05     ` Brian Gernhardt
2007-03-02 19:35       ` Andy Parkins
2007-03-02 20:35         ` Brian Gernhardt
2007-03-01 18:01 ` Robin Rosenberg
2007-03-02  0:09 ` Junio C Hamano
2007-03-02  4:46   ` Junio C Hamano
2007-03-02  8:58     ` Andy Parkins
2007-03-02  8:56   ` Andy Parkins
2007-03-02 13:56 ` Jakub Narebski
2007-03-02 16:58   ` Linus Torvalds
2007-03-02 19:37     ` Andy Parkins
2007-03-02 21:02       ` Linus Torvalds
2007-03-02 21:45         ` Johannes Schindelin
2007-03-02 22:21         ` Andy Parkins
2007-03-02 22:24           ` Andy Parkins
2007-03-03 13:11     ` Junio C Hamano [this message]
2007-03-03 20:27     ` Jakub Narebski

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=7vlkiebhfl.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=torvalds@linux-foundation.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.