Re: [PATCH] git-add--interactive: manual hunk editing mode
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- May 30, 2008, 12:21 UTC
- Message-ID
- <200805301421.46162.trast@student.ethz.ch>
- In-Reply-To
- <20080529185808.GA2140@sigill.intra.peff.net>
Jeff King wrote:
Show 9 quoted lines
> But I find the interface a bit clunky. I would much rather get dumped in > my favorite editor, which happens to be quite fast at removing a subset > of lines. After editing, any lines remaining would be staged. > > We would have to figure out what happens if lines are added or edited, > of course. It may be right to signal an error, or maybe there is some > other useful functionality that can come of that. I think other systems > have some diff-editing functionality (IIRC, cogito did). It is probably > worth looking at that for ideas.
We could just see if the hunk applies to the unchanged index (still assuming we're inside 'add -p'), and if not, reject the edit.
Unfortunately git-apply does not seem to have a --dry-run option. (Even stranger, when given the option --dry-run it tries to open a patch of that name.) What is the recommended way to do such things? Make a backup copy of the index and apply --cached anyway?
- Thomas
-- Thomas Rast trast@student.ethz.ch