Git development
 help / color / mirror / Atom feed
* [PATCH] Do not print header in diff-tree --root unless asked to
@ 2006-03-25 23:28 Petr Baudis
  2006-03-26  0:48 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Baudis @ 2006-03-25 23:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Currently cg-log -f is broken (shows sha1 in files list for the initial
commit) since git-diff-tree would always return the sha1 of the commit
when --root was passed. I assume it should do this only when -v was also
passed; I'm certain that I don't want it when processing the output.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 diff-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/diff-tree.c b/diff-tree.c
index f55a35a..8d82b5b 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -107,7 +107,8 @@ static int diff_tree_commit(struct commi
 
 	/* Root commit? */
 	if (show_root_diff && !commit->parents) {
-		header = generate_header(sha1, NULL, commit);
+		if (verbose_header)
+			header = generate_header(sha1, NULL, commit);
 		diff_root_tree(sha1, "");
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do not print header in diff-tree --root unless asked to
  2006-03-25 23:28 [PATCH] Do not print header in diff-tree --root unless asked to Petr Baudis
@ 2006-03-26  0:48 ` Junio C Hamano
  2006-03-26  1:50   ` Petr Baudis
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-03-26  0:48 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

Petr Baudis <pasky@suse.cz> writes:

> ... git-diff-tree would always return the sha1 of the commit
> when --root was passed.

I am not sure why this change is needed.

The output from "git-diff-tree --root e83c51" (the very initial
"git") and "git-diff-tree 8bc9a0" (the second commit) without
any other parameters (specifically, there is no '-v') look
comparable right now, but I suspect this change would break it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do not print header in diff-tree --root unless asked to
  2006-03-26  0:48 ` Junio C Hamano
@ 2006-03-26  1:50   ` Petr Baudis
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Baudis @ 2006-03-26  1:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Dear diary, on Sun, Mar 26, 2006 at 01:48:36AM CET, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> 
> > ... git-diff-tree would always return the sha1 of the commit
> > when --root was passed.
> 
> I am not sure why this change is needed.
> 
> The output from "git-diff-tree --root e83c51" (the very initial
> "git") and "git-diff-tree 8bc9a0" (the second commit) without
> any other parameters (specifically, there is no '-v') look
> comparable right now, but I suspect this change would break it.

I was confused by the fact that

	git-diff-tree --root rev1

gives a different output than

	git-diff-tree --root rev1 rev2

Sorry for the noise,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-26  1:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-25 23:28 [PATCH] Do not print header in diff-tree --root unless asked to Petr Baudis
2006-03-26  0:48 ` Junio C Hamano
2006-03-26  1:50   ` Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox