enrico <enrico.guiraud@xxxxxxxxx> writes: > Hello all, > I have encountered a couple of non-necessary difficulties when editing a > patch during a `git add -p`. > > Firstly, the help message says > "To remove '-' lines, make them ' ' lines (context)." > which is a bit confusing because that "them" refers to '-', not to 'lines'. I think that sentence refers to a line line this in a patch: -This is what the line used to be as a '-'-line. A line that does not change between preimage and postimage have SP instead of '-' at the beginning, and the sentence seems to refer to it as a ' '-line. So from that reading, "turning '-'-lines that you do not want to loes into ' '-lines" is perfectly sensible phrasing. In any case, "edit" is about giving a low-level access and precise control to people who are familiar with (1) what each line of "diff" output means and (2) what is done to them by "patch" (rather, in Git's context, "apply"). I agree with you that "edit" mode is a too-advanced tool for those who are not comfortable with these two things. A solution would however not be to modify "edit" mode (which would affect those who are prepared to and want to use the "low-level access and precise control" to their advantage), but to introduce an easier-to-use, and perhaps a bit limited for safety, mode for those who are not the target audience for "edit" mode. The "split" subcommand to split the hunk before applying was an attempt to go in that direction; it never allows you the user to make an arbitrary change to corrupt the patch and make it unusable. Perhaps you can mimick its spirit and come up with a new "guarded edit" command? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html