Thread (47 messages) flat view 47 messages, 8 authors, 2016-06-15

Re: [PATCH] git-add--interactive: manual hunk editing mode

From: Thomas Rast <hidden>
Date: 2016-06-15 22:44:39

Jeff King wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help