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

Re: [PATCH] git-diff: Introduce --index and deprecate --cached.

From
Junio C Hamano <junkio@cox.net>
Date
Dec 9, 2006, 02:29 UTC
Message-ID
<7v64clg5u9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vac1xg61s.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 5 quoted lines
> Although I've applied this long time ago (in git timescale
> anyway), this patch and the above rationale is wrong.
>
> 'diff --cached' is more in line with how 'apply --cached' works,
> not how 'apply --index' works.

Side note. I do not think --index and --cached are a good pair of words to express the different semantics (the former works on the working tree through the index, the latter works only on the cached data and not on the working tree). I was only pointing out that making 'diff --index' a synonym to 'diff --cached' closes the door for the possibility to have these two semantics that are consistently spelled (well, maybe "confusingly spelled", but still consistently) between diff and apply.

Previous: Junio C Hamano
Message 3 of 3 in “git-diff: Introduce --index and deprecate --cached.”
  1. git-diff: Introduce --index and deprecate --cached.Andreas Ericsson, Nov 30, 2006
  2. Junio C HamanoDec 9, 2006
  3. Junio C HamanoDec 9, 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.