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

Re: pseudo initial empty commit and tag for git-log and git-describe?

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 20, 2006, 15:12 UTC
Message-ID
<Pine.LNX.4.64.0609200807120.4388@g5.osdl.org>
In-Reply-To
<fcaeb9bf0609200658p3f04df7oe91ddb971787bd70@mail.gmail.com>
On Wed, 20 Sep 2006, Nguyá»n Thái Ngá»c Duy wrote:
>
> I'm still uncomfortable with git-log -p unable to show the first
> commit (git-whatchanged too).

Both of those work fine with "--root". That option tells git: "I'm interested in the root patch too".

It might make sense to have "--root" be the default, but the problem is that for projects like the Linux kernel where the first commit is a big import, showing it as a patch simply doesn't make sense.

So it would have to be a per-repository decision, depending on whether the repo considers the first commit to be an import or not. Maybe a git-config option?

> Also git-describe refuses to work without any tag.

Now, that's arguably a real bug. You should be able to describe any commit, and if there's no tag that is reachable from it, the "description" should probably just be the SHA1 of the commit.

(Side issue: we should probably also accept the output of "git describe" as a revision name, since it's a bit silly that you can ask git to "describe" a revision, but then git can't actually use the description itself ;)

			Linus
Previous: Nguyễn Thái Ngọc Duy
Message 4 of 4 in “pseudo initial empty commit and tag for git-log and git-describe?”
  1. Nguyễn Thái Ngọc DuySep 20, 2006
  2. Matthias KestenholzSep 20, 2006
  3. Nguyễn Thái Ngọc DuySep 21, 2006
  4. Linus TorvaldsSep 20, 2006

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.