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

Re: [RFC/PATCH] Fix git-diff --cached to not error out if HEAD points to a nonexistant branch

From
Junio C Hamano <junkio@cox.net>
Date
Feb 25, 2007, 09:45 UTC
Message-ID
<7vlkimtvsn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070225091302.GB3897@xp.machine.xx>
Peter Baumann <waste.manager@gmx.de> writes:
> ..., but in the same sentence you have to say
> "Oh, did I mention that it doesn't work until you have made a first commit?"

Well, you do not even have to mention that if you are explaining things correctly. If something does its thing relative to the latest commit, then it obviously would not work until you have that "latest commit". There is _no_ initial "empty" commit in git.

I think getting people used to that concept early on would actually avoid such confusion. In that sense,...

> The plumbing commands are a diffrent story.

... I do not think the plumbing should be a different story. Otherwise you would confuse people when they start learning the plumbing.

Previous: Peter BaumannNext: Peter Baumann
Message 6 of 8 in “Fix git-diff --cached to not error out if HEAD points to a nonexistant branch”
  1. Fix git-diff --cached to not error out if HEAD points to a nonexistant branchPeter Baumann, Feb 24, 2007
  2. Junio C HamanoFeb 24, 2007
  3. Peter BaumannFeb 24, 2007
  4. Junio C HamanoFeb 25, 2007
  5. Peter BaumannFeb 25, 2007
  6. Junio C HamanoFeb 25, 2007
  7. Peter BaumannFeb 25, 2007
  8. Peter BaumannFeb 25, 2007

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.