git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG?] gitk assumes initial commit is empty

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 29, 2011, 16:40 UTC
Message-ID
<7vwrcrti84.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4E8481A2.6060301@in.waw.pl>
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 ;-)
Previous: Zbigniew Jędrzejewski-Szmek
Message 2 of 2 in “[BUG?] gitk assumes initial commit is empty”
  1. Zbigniew Jędrzejewski-SzmekSep 29, 2011
  2. Junio C HamanoSep 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.