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

Re: [RFC] Possible strategy cleanup for git add/remove/diff etc.

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 20, 2005, 01:51 UTC
Message-ID
<Pine.LNX.4.58.0504191846290.6467@ppc970.osdl.org>
In-Reply-To
<7vacnumgot.fsf@assigned-by-dhcp.cox.net>
On Tue, 19 Apr 2005, Junio C Hamano wrote:
> 
> Let's for a moment forget what git-pasky currently does, which
> is not to touch .git/index until the user says "Ok, let's
> commit". 
I think git-pasky is wrong.

It's true that we want to often (almost always) diff against the last "released" thing, and I actually think git-pasky does what it does because I never wrote a tool to diff the current working directory against a "tree".

At the same time, I very much worked with a model where you do _not_ have a traditional "work file", but the index really _is_ the "work file".

Show 6 quoted lines
> I'd like to start from a different premise and see what happens:
> 
>  - What .git/index records is *not* the state as the last
>    commit.  It is just an cache Cogito uses to speed up access
>    to the user's working tree.  From the user's point of view,
>    it does not even exist.
Yes. Yes. YES.

That is indeed the whole point of the index file. In my world-view, the index file does _everything_. It's the staging area ("work file"), it's the merging area ("merge directory") and it's the cache file ("stat cache").

I'll immediately write a tool to diff the current working directory against a tree object, and hopefully that will just make pasky happy with this model too.

Is there any other reason why git-pasky wants to have a work file?
		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 10 in “"True" git merge in git-pasky”
  1. Petr BaudisApr 19, 2005
  2. bert hubertApr 19, 2005
  3. Petr BaudisApr 19, 2005
  4. Francois RomieuApr 19, 2005
  5. [RFC] Possible strategy cleanup for git add/remove/diff etc.Junio C Hamano, Apr 20, 2005
  6. Linus TorvaldsApr 20, 2005
  7. Junio C HamanoApr 20, 2005
  8. Linus TorvaldsApr 20, 2005
  9. Junio C HamanoApr 20, 2005
  10. Junio C HamanoApr 21, 2005

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.