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

Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 28, 2006, 13:23 UTC
Message-ID
<ekhd5q$qb1$1@sea.gmane.org>
In-Reply-To
<200611281400.37191.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer wrote:
Show 19 quoted lines
> On Tuesday 28 November 2006 07:59, Junio C Hamano wrote:
>> Once I am done, I can ask "git diff" and expect it to show my
>> local changes I have no intention of committing for now
>> ...
>> 
>> And at that point, I trust "git commit" to do the right thing --
>> the damn thing I just checked with "git diff --cached" _is_ what
>> will be committed.
> 
> I think the difference behavior between "git commit" and "git diff" is
> a little bit confusing.
> 
> Currently, we have
> * "git diff" shows what "git commit -a" would commit
> * "git diff --cached" shows what "git commit" would commit
> 
> IMHO, "git diff" should show what's in the staging area,
> and we should introduce "git diff -a" as a way to see the full
> changes.

I see it in other way. "git diff" tells us if a tree has changed wrt. what would be committed. It is not a preview of commit.

Also, as of now the version without additional option is a fastest one, both for diff and for commit.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Josef WeidendorferNext: Carl Worth
Message 12 of 25 in “"init-db" can really be just "init"”
  1. "init-db" can really be just "init"Nicolas Pitre, Nov 27, 2006
  2. Junio C HamanoNov 27, 2006
  3. Hyphens and hiding core commands (was: "init-db" can really be just "init")Carl Worth, Nov 27, 2006
  4. Junio C HamanoNov 27, 2006
  5. Carl WorthNov 28, 2006
  6. Junio C HamanoNov 28, 2006
  7. Carl WorthNov 28, 2006
  8. Junio C HamanoNov 28, 2006
  9. 0/2 Making "git commit" to mean "git commit -a".Junio C Hamano, Nov 28, 2006
  10. Andy WhitcroftNov 28, 2006
  11. Josef WeidendorferNov 28, 2006
  12. Jakub NarebskiNov 28, 2006
  13. Carl WorthNov 28, 2006
  14. Salikh ZakirovNov 30, 2006
  15. Jakub NarebskiNov 30, 2006
  16. Seth FalconNov 30, 2006
  17. Nguyen Thai Ngoc DuyNov 30, 2006
  18. Seth FalconNov 30, 2006
  19. Jakub NarebskiNov 30, 2006
  20. Andy WhitcroftNov 30, 2006
  21. 1/2 git-commit: prepare to make '-a' behaviour the default.Junio C Hamano, Nov 28, 2006
  22. 2/2 git-commit: make '-a' the default.Junio C Hamano, Nov 28, 2006
  23. Jakub NarebskiNov 28, 2006
  24. Johannes SchindelinNov 27, 2006
  25. Han-Wen NienhuysNov 28, 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.