Commit graph

2 commits

Author SHA1 Message Date
Johannes Schindelin 7c8224b6a8 t3702: fix reliance on SHELL_PATH being '/bin/sh'
Trying to be lazy and comparing files with fake-editor.sh to avoid
having to provide another example text does not work well: the blob
name changes when SHELL_PATH changes, and so does the 'index' line
in the diff.

Therefore provide a second example text.

Noticed by Mike Ralphson.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27 18:23:55 -07:00
Johannes Schindelin c59cb03a8b git-add: introduce --edit (to edit the diff vs. the index)
With "git add -e [<files>]", Git will fire up an editor with the current
diff relative to the index (i.e. what you would get with "git diff
[<files>]").

Now you can edit the patch as much as you like, including adding/removing
lines, editing the text, whatever.  Make sure, though, that the first
character of the hunk lines is still a space, a plus or a minus.

After you closed the editor, Git will adjust the line counts of the hunks
if necessary, thanks to the --recount option of apply, and commit the
patch.  Except if you deleted everything, in which case nothing happens
(for obvious reasons).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-12 11:56:17 -07:00