Jeff King <peff@xxxxxxxx> writes: > But I have to wonder if there is some more robust solution. It seems > like this can have false positives if you include diff output in your > commit message, and a potential false negative if you delete the newline > (e.g., delete everything up to "diff --git", making it the first line). Actually, I recall (from my googling quite some time ago) people noticing this, but they learnt to live with it. We may want to change this. We can say "# Everything under this line is deleted." at the beginning of the "#" block we produce in the commit log message editor, replacing the "Lines starting with '#' will be ignored, " we currently have. When reading back the editor result, make "git commit -v" scan for the "# Everything ..." line. We remove it and everything that follows, but we do not touch anything above that line (including the ones that begin with "diff" or "#") except the usual trailing whitespace removal. That way, people can leave a sample shell session with root prompt, and sample diff, in their message. If we do not see "# Everything ..." when we read it back, we can do what we currently do as a fallback. -- 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