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

Re: [PATCH] Fix 'git commit -a' in a newly initialized repository

From
Nicolas Pitre <nico@cam.org>
Date
Feb 23, 2007, 00:06 UTC
Message-ID
<alpine.LRH.0.82.0702221904210.27932@xanadu.home>
In-Reply-To
<7vhctddge7.fsf@assigned-by-dhcp.cox.net>
On Thu, 22 Feb 2007, Junio C Hamano wrote:
Show 11 quoted lines
> However, because ! test -f "$THIS_INDEX" is such a special case
> (totally new check-in), we can afford to be verbose if we wanted
> to, and offer tons of possibilities, say:
> 
> 	die 'nothing to commit.  You can use "git add file..."
> to include individual files, or use "git add ." if you want to 
> include all files in the current directory, for your first
> commit.'
> 
> But if we want to say "for your first commit" in the message, we
> should also be checking if HEAD commit really does not exist.
Seems to me that the single line message avoids all those issues.
Nicolas
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 9 in “Fix 'git commit -a' in a newly initialized repository”
  1. Fix 'git commit -a' in a newly initialized repositoryFredrik Kuivinen, Feb 22, 2007
  2. Johannes SchindelinFeb 22, 2007
  3. Nicolas PitreFeb 22, 2007
  4. Johannes SchindelinFeb 22, 2007
  5. Nicolas PitreFeb 22, 2007
  6. Johannes SchindelinFeb 22, 2007
  7. Junio C HamanoFeb 22, 2007
  8. Nicolas PitreFeb 23, 2007
  9. Junio C HamanoFeb 23, 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.