On 7/13/08, Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> Sorry, but I am scratching my head here. Shouldn't this "bare From > >> munging" be like this instead? > >> > >> $message =~ s/^From />From /m; > > > > That wouldn't be a reversible operation. > > So what? Adding Cc: and stuff send-email does are already irreversible > anyway. At one point the people who write mailers realized that just munging "From" to ">From" when putting things into an mbox was irreversible, ie, there was no way to later display the contents of the mbox without showing ">From" where "From" was intended. However, if you always insert _another_ ">" whenever "^>*From" is detected, then you can also always do the opposite upon displaying to the user, and the message is effectively not munged. It becomes simply a part of the mbox file encoding. So by encoding it this way, someone with a modern mailer could view the resulting mbox with all the munged text de-mungled. Someone without a modern mailer would see munging anyhow, so they're no worse off. Have fun, Avery -- 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