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

Re: [PATCH] update-index: add --swap to swap index and worktree content

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 17, 2011, 02:11 UTC
Message-ID
<CACsJy8Ad4xPz79jT3O64c3XsCeM8XETJ9bnjK0aisagrYN0CMA@mail.gmail.com>
In-Reply-To
<20110816230654.GA21793@sigill.intra.peff.net>
2011/8/17 Jeff King <peff@peff.net>:
Show 6 quoted lines
>> As a way to punt from making "add -e" usable, I'd think it would be a
>> workable q&d workaround, even though it feels wrong, and I would imagine
>> that normal people would probably prefer the "check out to a temporary
>> file to be edited" solution you wrote in your previous message.
>
> Yeah, I think that is the sanest of the options brought up in this

I blame git for training me always do "git diff" before update index. But if we add "add -e", I could also make "add -e -p" work, (edit temporary file first, then fall back to interactive mode and let me review my changes).

> thread. I'm curious if Duy had another use case, though, that made him
> think of --swap.

Two reasons. I already mentioned the ability to quickly checkout index for a quick test (though there could be more problems down that road).

The other one could be done another way too. I translation coordinator. When a translator sends their translations to me, I'd pick good translations and commit them, leaving the rest for discussion. This is why I don't want to touch wt. While adding translations to index, I may find a mistake in current translation (ie. in index) and want to fix it too.

-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 10 of 16 in “update-index: add --swap to swap index and worktree content”
  1. update-index: add --swap to swap index and worktree contentNguyễn Thái Ngọc Duy, Aug 12, 2011
  2. Michael J GruberAug 16, 2011
  3. Nguyen Thai Ngoc DuyAug 16, 2011
  4. Junio C HamanoAug 16, 2011
  5. Jeff KingAug 16, 2011
  6. Junio C HamanoAug 16, 2011
  7. Jeff KingAug 16, 2011
  8. Junio C HamanoAug 16, 2011
  9. Jeff KingAug 16, 2011
  10. Nguyen Thai Ngoc DuyAug 17, 2011
  11. Jeff KingAug 17, 2011
  12. Martin von ZweigbergkAug 17, 2011
  13. Nguyen Thai Ngoc DuyAug 17, 2011
  14. Junio C HamanoAug 17, 2011
  15. Jeff KingAug 17, 2011
  16. Martin von ZweigbergkAug 18, 2011

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.