How to refer to a code snippet in email?

Greg KH greg at kroah.com
Tue Oct 11 02:21:19 EDT 2022


On Mon, Oct 10, 2022 at 05:55:33PM -0400, Drake Talley wrote:
> There is ample documentation for how to include a patch file, commits, or diff in emails,
> but I haven't been able to discern what is the preferred way to refer to code snippets
> as line ranges in a file for a given revision.
> 
> Is this just not that common so it isn't done?  Or is there a general approach
> to just pasting in a hunk of source code and manually stating the file/line numbers?

It is not that common, but if needed, just copy the needed code into the
email and go from there.  We all work from different trees, so line
numbers do not usually match up, but function names should be enough to
orient people.

> Curious both as to what's possible in an email-driven git workflow and how things are done here.

Again, it's not that common, look at the linux-kernel mailing list
archives on lore.kernel.org for examples of how things normally work.

good luck!

greg k-h



More information about the Kernelnewbies mailing list