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