All of lore.kernel.org
 help / color / mirror / Atom feed
* How to refer to a code snippet in email?
@ 2022-10-10 21:55 Drake Talley
  2022-10-11  6:21 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Drake Talley @ 2022-10-10 21:55 UTC (permalink / raw)
  To: kernelnewbies

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?

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


Thanks!
Drake

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to refer to a code snippet in email?
  2022-10-10 21:55 How to refer to a code snippet in email? Drake Talley
@ 2022-10-11  6:21 ` Greg KH
  2022-10-11  7:52   ` Lukas Bulwahn
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2022-10-11  6:21 UTC (permalink / raw)
  To: Drake Talley; +Cc: kernelnewbies

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to refer to a code snippet in email?
  2022-10-11  6:21 ` Greg KH
@ 2022-10-11  7:52   ` Lukas Bulwahn
  2022-10-17 16:45     ` Drake Talley
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Bulwahn @ 2022-10-11  7:52 UTC (permalink / raw)
  To: Greg KH; +Cc: Drake Talley, kernelnewbies

On Tue, Oct 11, 2022 at 8:21 AM Greg KH <greg@kroah.com> wrote:
>
> 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.
>

As Greg said, it is not common.

However, it might help you to look how the 0day-bot (kernel test
robot) reports in its emails the location (and the "hunk of source
code") where a build error or build warning appeared. The 0-bot
testing team did take some feedback from developers into account, and
the developers are used to that type of output by now. Hence, this
might serve as a good reference or at least as some food for thought
(how to improve upon that style of reporting).

I hope this helps.

Lukas

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to refer to a code snippet in email?
  2022-10-11  7:52   ` Lukas Bulwahn
@ 2022-10-17 16:45     ` Drake Talley
  0 siblings, 0 replies; 4+ messages in thread
From: Drake Talley @ 2022-10-17 16:45 UTC (permalink / raw)
  To: Lukas Bulwahn; +Cc: Greg KH, kernelnewbies

Lukas Bulwahn <lukas.bulwahn@gmail.com> writes:

> On Tue, Oct 11, 2022 at 8:21 AM Greg KH <greg@kroah.com> wrote:
>>
>> 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.
>>

thanks for the info here!  good to know it doesn't really come up and
that different trees mean line numbers aren't terribly helpful anyway

> As Greg said, it is not common.
>
> However, it might help you to look how the 0day-bot (kernel test
> robot) reports in its emails the location (and the "hunk of source
> code") where a build error or build warning appeared. The 0-bot
> testing team did take some feedback from developers into account, and
> the developers are used to that type of output by now. Hence, this
> might serve as a good reference or at least as some food for thought
> (how to improve upon that style of reporting).
>
> I hope this helps.
>
> Lukas

nice.  that's a helpful example for how this sort of information can be
conveyed via email.


thanks again for clearing this up

> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-17 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 21:55 How to refer to a code snippet in email? Drake Talley
2022-10-11  6:21 ` Greg KH
2022-10-11  7:52   ` Lukas Bulwahn
2022-10-17 16:45     ` Drake Talley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.