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

Re: Feedback on git-restore

From
Duy Nguyen <pclouds@gmail.com>
Date
May 16, 2019, 12:44 UTC
Message-ID
<CACsJy8D16A3VKdTFfVyENZoH4J7Dv-3iwovEgsUj07KUT8NBKA@mail.gmail.com>
In-Reply-To
<d8fd0d06-ec83-941f-c29f-2fea0efb6fd3@iee.org>
On Thu, May 16, 2019 at 7:12 PM Philip Oakley <philipoakley@iee.org> wrote:
> Maybe we need a `git index` command to make it far more visible to
> average users (or `git staging-area --show`, with a --cached option ;-).

Not commenting on the other parts (and also Junio's mail) since I still need more time to process.

But how about we see the index as a "commit-in-progress" (or "staging area" which is almost the same, maybe "commit area" is better)?

You can't make a commit visible unless you check it out (and then can use various tools available to work on filesystem), or you use git diff/show to examine it. The index is treated pretty much the same way, except that it does not have a proper SHA-1 yet because it's still a work in progress.

Short of creating a fuse filesystem to show you the index content (as read-only files) I don't see any better way that you can actually see the index without checking it out.

PS. Yes I ignored the role of the index during a merge conflict. Not relying on the index for conflict handling might be possible, but I'm not going to touch that topic, way out of my area.

-- 
Duy
Previous: Philip OakleyNext: Philip Oakley
Message 7 of 8 in “Feedback on git-restore”
  1. Poughon VictorMay 15, 2019
  2. Duy NguyenMay 15, 2019
  3. Ævar Arnfjörð BjarmasonMay 15, 2019
  4. Duy NguyenMay 15, 2019
  5. Junio C HamanoMay 16, 2019
  6. Philip OakleyMay 16, 2019
  7. Duy NguyenMay 16, 2019
  8. Philip OakleyMay 18, 2019

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.