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

Re: Separating "add path to index" from "update content in index"

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 22, 2006, 08:24 UTC
Message-ID
<emg4j2$f8v$1@sea.gmane.org>
In-Reply-To
<7vfyb87bxg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 5 quoted lines
> And it is not just limited to adding the contents of a path that
> happened to be told git for the first time.  Adding the contents
> of a path that was known to git also happens only when it is in
> a presentable good state.  So running "git diff" and not seeing
> what I added before is a GOOD THING.

If I remember correctly the idea behind "intent to add" was to show only that file was added (e.g. the "new file" line from extended diff header) in "git diff" when file was added and not modified (and no changes to "git diff HEAD").

Although I'm not sure if this wouldn't screw some use cases which include something like "git diff > some-temporary-file"...

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Shawn PearceNext: Carl Worth
Message 18 of 22 in “GIT - error: no such remote ref refs/heads/TestBranch”
  1. Sean KelleyDec 19, 2006
  2. Junio C HamanoDec 19, 2006
  3. Carl WorthDec 20, 2006
  4. Junio C HamanoDec 20, 2006
  5. Carl WorthDec 20, 2006
  6. Junio C HamanoDec 20, 2006
  7. Carl WorthDec 21, 2006
  8. Peter BaumannDec 21, 2006
  9. Junio C HamanoDec 22, 2006
  10. Separating "add path to index" from "update content in index"Carl Worth, Dec 22, 2006
  11. SeanDec 22, 2006
  12. Nicolas PitreDec 22, 2006
  13. Carl WorthDec 22, 2006
  14. Nicolas PitreDec 23, 2006
  15. Daniel BarkalowDec 24, 2006
  16. Junio C HamanoDec 22, 2006
  17. Shawn PearceDec 22, 2006
  18. Jakub NarebskiDec 22, 2006
  19. Carl WorthDec 22, 2006
  20. Nicolas PitreDec 22, 2006
  21. Carl WorthDec 22, 2006
  22. Daniel BarkalowDec 23, 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.