git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Log message printout cleanups
Date: Tue, 18 Apr 2006 09:06:02 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604180854550.3701@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0604180827040.3701@g5.osdl.org>



On Tue, 18 Apr 2006, Linus Torvalds wrote:
> 
> But this all looks very nice. I agree that "git log --stat" is a very nice 
> way to look at the log, much better than "git-whatchanged". And the thing 
> that has really fallen out of this all is how you can do
> 
> 	git log --stat --full-diff drivers/pci/
> 
> which git-whatchanged historically didn't support (of course, now it 
> does, but you're right, the new "git log" is so nice that I'm starting to 
> teach myself not to use "git whatchanged" any more).

Junio, I just tested the "master" branch, and "git log --stat" doesn't 
work there. You may _think_ it works because you've tested it on the git 
tree, were it looks like it is working, but it's missing setting 
"recursive", so it won't actually go into any subdirectories (so it mostly 
works for git itself which has most stuff in the top-level directory, but 
it almost completely doesn't work for linux)

"git log -r --stat" works, so it's really just a missing that.

Something like this (this is master, not "next").

"next" actually has the same bug, but there it is hidden because "git log" 
sets recursive automatically. Which may or may not be appropriate. It 
might be worthwhile to fix it properly in "next" too (there the same 

	if (...output_format == DIFF_FORMAT_PATCH)
		...recursive = 1;

is in revision.c: setup_revisions()).

		Linus

----
diff --git a/git.c b/git.c
index 140ed18..f98c9ba 100644
--- a/git.c
+++ b/git.c
@@ -344,7 +344,8 @@ static int cmd_log(int argc, const char 
 			opt.ignore_merges = 0;
 		if (opt.dense_combined_merges)
 			opt.diffopt.output_format = DIFF_FORMAT_PATCH;
-		if (opt.diffopt.output_format == DIFF_FORMAT_PATCH)
+		if (opt.diffopt.output_format == DIFF_FORMAT_PATCH ||
+		    opt.diffopt.output_format == DIFF_FORMAT_DIFFSTAT)
 			opt.diffopt.recursive = 1;
 		if (!full_diff && rev.prune_data)
 			diff_tree_setup_paths(rev.prune_data, &opt.diffopt);

  reply	other threads:[~2006-04-18 16:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-16 22:17 Fixes for option parsing Linus Torvalds
2006-04-17  0:29 ` Junio C Hamano
2006-04-17  2:42   ` Linus Torvalds
2006-04-17  3:03     ` Linus Torvalds
2006-04-17  3:36     ` Junio C Hamano
2006-04-17 14:51       ` Linus Torvalds
2006-04-17 18:59   ` Log message printout cleanups Linus Torvalds
2006-04-17 22:45     ` Junio C Hamano
2006-04-17 23:59       ` Linus Torvalds
2006-04-18  0:22         ` Junio C Hamano
2006-04-18  0:37           ` Junio C Hamano
2006-04-18  0:57             ` Linus Torvalds
2006-04-18  5:52               ` Junio C Hamano
2006-04-18 15:37                 ` Linus Torvalds
2006-04-18 16:06                   ` Linus Torvalds [this message]
2006-04-18 16:48                     ` Junio C Hamano
2006-04-18 18:33                     ` [PATCH] diff --stat: make sure to set recursive Junio C Hamano
2006-04-18  0:43           ` Log message printout cleanups Linus Torvalds

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=Pine.LNX.4.64.0604180854550.3701@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).