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

Re: [Bug] git add -i fails in multiple ways prior to first commit.

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2008, 11:30 UTC
Message-ID
<7v63wtqejf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080213101649.GA18444@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> However, I wonder if this is the best approach. It would be nice if
> there were a shorthand for "the empty tree" for diffing, so you could
> just diff against that rather than HEAD, and have the regular plumbing
> generate.

I guess you can set your worktree to an empty directory and run diff-files backwards, like perhaps:

	mkdir /var/tmp/empty
        (cd .git && GIT_WORK_TREE=/var/tmp/empty git diff -R)
Have I tried it?  No --- I am not sick enough to be motivated.
Previous: Johannes SchindelinNext: Jeff King
Message 12 of 13 in “[Bug] git add -i fails in multiple ways prior to first commit.”
  1. Rhodes, KateFeb 12, 2008
  2. Jeff KingFeb 13, 2008
  3. Jakub NarebskiFeb 13, 2008
  4. Jeff KingFeb 13, 2008
  5. add--interactive: handle initial commit betterJeff King, Feb 13, 2008
  6. Jeff KingFeb 13, 2008
  7. Johannes SchindelinFeb 13, 2008
  8. Jakub NarebskiFeb 13, 2008
  9. Jeff KingFeb 13, 2008
  10. Johannes SchindelinFeb 13, 2008
  11. Johannes SchindelinFeb 13, 2008
  12. Junio C HamanoFeb 13, 2008
  13. Jeff KingFeb 13, 2008

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.