All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karolina Drobnik <karolinadrobnik@gmail.com>
To: Alison Schofield <alison.schofield@intel.com>,
	Outreachy Linux Kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] Help maintain the First Patch Tutorial
Date: Mon, 25 Oct 2021 12:44:28 +0100	[thread overview]
Message-ID: <9bb37f004a66b22114572ada1a3d20def81fbcff.camel@gmail.com> (raw)
In-Reply-To: <20211014174207.GA426328@alison-desk>

Hi,

I noticed that the information in the "sending patchsets" section is
slightly outdated. I updated the `git format-patch` listing and added
information on how to actually send the patches.

What do you think about this draft?


Thanks,
Karolina

---------------------------------------------------------------------

<<Anchor(git_format_patch_patchset)>>
== Using git format-patch to send patchsets ==

First, use {{{`git log --pretty=oneline --abbrev-commit`}}} to figure
out the first commit ID you want to send. For example, say that my tree
had this git log history:

{{{
b7ca36a Docs: Move ref to Frohwalt Egerer to end of REPORTING-BUGS
bf6adaf Docs: Add a tips section to REPORTING-BUGS.
bc6bed4 Docs: Expectations for bug reporters and maintainers
2c97a63 Docs: Add info on supported kernels to REPORTING-BUGS.
7883a25 Docs: Add "Gather info" section to REPORTING-BUGS.
d60418b Docs: Step-by-step directions for reporting bugs.
3b12c21 Trivial: docs: Remove six-space indentation in REPORTING-BUGS.
bb33db7 Merge branches 'timers-urgent-for-linus', 'irq-urgent-for-
linus' and 'core-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
41ef2d5 Linux 3.9-rc7
}}}

The first commit I want to send as part of the patchset has commit ID
3b12c21. The last patch I want to send has commit ID b7ca36a. 
So, I want to pass the commit range {{{3b12c21^..b7ca36a}}} to {{{git
format-patch}}}. (Remember, the {{{git format-patch}}} range starting
commit must be the commit ''before'' the first commit you want to send,
so we use the '^' to specify the patch before commit 3b12c21). The
command will look something like this:

{{{
git format-patch -o /tmp/ --cover-letter -n --thread=shallow
3b12c21^..b7ca36a
}}}

Again, the -o flag specifies where to put the email files. The -n flag
says to add numbering to each patch (e.g. [PATCH 2/5]). The `--
thread=shallow` flag specifies that all patches will be In-Reply-To
your cover letter.

That will output files into /tmp:
{{{
/tmp/0000-cover-letter.patch
/tmp/0001-Trivial-docs-Remove-six-space-indentation-in-REPORTI.patch
/tmp/0002-Docs-Step-by-step-directions-for-reporting-bugs.patch
/tmp/0003-Docs-Add-Gather-info-section-to-REPORTING-BUGS.patch
/tmp/0004-Docs-Add-info-on-supported-kernels-to-REPORTING-BUGS.patch
/tmp/0005-Docs-Expectations-for-bug-reporters-and-maintainers.patch
/tmp/0006-Docs-Add-a-tips-section-to-REPORTING-BUGS.patch
/tmp/0007-Docs-Move-ref-to-Frohwalt-Egerer-to-end-of-REPORTING.patch
}}}

To send them as a patchset, you need to provide a path that matches all
of these files. In this case, the `git send-email` command would look
like this:

{{{
git send-email --to <outreachy mailing list if required> --cc
<addresses from get_maintainer.pl output> /tmp/*
}}}

If you would like to test your patchset emails before sending them, you
can add `--dry-run` option that will execute the command without
sending the actual emails.




  parent reply	other threads:[~2021-10-25 11:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 17:42 Help maintain the First Patch Tutorial Alison Schofield
2021-10-18  9:59 ` [Outreachy kernel] " Karolina Drobnik
2021-10-18 10:12   ` Julia Lawall
2021-10-18 14:01     ` Karolina Drobnik
2021-10-18 14:18       ` Julia Lawall
2021-10-18 17:54   ` Alison Schofield
2021-10-19  6:19     ` Greg KH
2021-10-19 15:36       ` Alison Schofield
2021-10-19 15:52         ` Greg KH
2021-10-20 13:00         ` Karolina Drobnik
2021-10-20 14:50           ` Alison Schofield
2021-10-19  9:01     ` Karolina Drobnik
2021-10-19  9:04       ` Julia Lawall
2021-10-25 11:44 ` Karolina Drobnik [this message]
2021-10-25 16:30   ` Alison Schofield
2021-10-26 12:33     ` Karolina Drobnik
2021-10-27 14:48     ` Karolina Drobnik
2021-10-27 19:20       ` Alison Schofield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bb37f004a66b22114572ada1a3d20def81fbcff.camel@gmail.com \
    --to=karolinadrobnik@gmail.com \
    --cc=alison.schofield@intel.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.