Re: Diffs "from" working directory
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:13
On Tue, 22 Nov 2005, Chuck Lever wrote:
then perhaps the problem is that the "stg mail" tool should place the author in the From: field automatically? (ie change the tool, or permanently modify the default template that comes with StGIT to do this, as Catalin suggested earlier). that seems a little twisty to me; you're overloading the SMTP header field instead of explicitly specifying patch authorship. seems like a layering violation.
No, I only use the actual SMTP header field if the _body_ of the email doesn't contain the "From:". So there's really two different "From:" lines: there's the SMTP header one, which is just a default fallback one, and there's the first non-empty line of the email body itself, which is the preferred one. No layering violation, just two different layers that have the same format for the line. See "The Perfect Patch" by Andrew, and bullet (4): Attribution: http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt To quote: 'If someone else wrote the patch, they should be credited (and blamed) for it. To communicate this, add a line: From: John Doe [off-list ref] as the very first line of the email. Downstream tools will pick this up and jdoe will get the git "Author" line.' and I'd be even more anal about it: I would seriously suggest to people that they just _always_ add the "From:" line at the head of the email, even if it just is exactly the same as what will be in the SMTP header. Why? Simple. It makes is less likely that somebody who just forwards the patch will forget to add that line for you. So you are really helping people out - and making sure the attribution stays correct - by adding that extra "From:" line at the top of your email body, even if it is "unnecessary" in the sense that it's also in your SMTP header. Linus