git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] gitk assumes initial commit is empty
@ 2011-09-29 14:33 Zbigniew Jędrzejewski-Szmek
  2011-09-29 16:40 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Zbigniew Jędrzejewski-Szmek @ 2011-09-29 14:33 UTC (permalink / raw)
  To: git

I was looking at gitk display for git itself, and scrolling all the way
down to initial commit show this:

Author: Linus Torvalds <torvalds@ppc970.osdl.org>  2005-04-08 00:13:13
Committer: Linus Torvalds <torvalds@ppc970.osdl.org>  2005-04-08 00:13:13
Child:  8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68 (Add copyright notices.)

    Initial revision of "git", the information manager from hell

with no files added or modified. But e.g. 'git show' shows that files
were added in the initial commit:

$ git show e83c5163316f89bfbde7d9ab23ca2e25604af290 --stat
Author: Linus Torvalds <torvalds@ppc970.osdl.org>
Date:   Thu Apr 7 15:13:13 2005 -0700
...
   11 files changed, 1244 insertions(+), 0 deletions(-)

In gitk, the next commit shows changes to some files, like if they existed
in the parent commit. So it seems that gitk assumes that initial commit
is empty, which doesn't have to be true.

This is with gitk from master.

-
Zbyszek

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

* Re: [BUG?] gitk assumes initial commit is empty
  2011-09-29 14:33 [BUG?] gitk assumes initial commit is empty Zbigniew Jędrzejewski-Szmek
@ 2011-09-29 16:40 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2011-09-29 16:40 UTC (permalink / raw)
  To: Zbigniew Jędrzejewski-Szmek; +Cc: git

Zbigniew Jędrzejewski-Szmek  <zbyszek@in.waw.pl> writes:

> In gitk, the next commit shows changes to some files, like if they existed
> in the parent commit. So it seems that gitk assumes that initial commit
> is empty, which doesn't have to be true.

It is not about assuming but by unfortunate design.

In early days, all projects managed by git (except for git itself) had the
product of a fairly mature development hsitory in their first commit, and
it was deemed unnecessary clutter to show additions of these thousands of
paths as a patch.

This was not just about gitk but git itself. "git log" learned to show the
patch for the initial commit without requiring --root command line option
only at 0f03ca9 (config option log.showroot to show the diff of root
commits, 2006-11-23).

These days I think gitk should learn to do the same ;-)

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

end of thread, other threads:[~2011-09-29 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 14:33 [BUG?] gitk assumes initial commit is empty Zbigniew Jędrzejewski-Szmek
2011-09-29 16:40 ` Junio C Hamano

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).