From edd207ba87f03afff6ab0f0badc42d48aae65b0d Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 26 Mar 2021 17:43:00 +1300 Subject: [PATCH] Add submitting a patchset documentation --- docs/Submitting a patchset.md | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/Submitting a patchset.md diff --git a/docs/Submitting a patchset.md b/docs/Submitting a patchset.md new file mode 100644 index 0000000..9ed7f3e --- /dev/null +++ b/docs/Submitting a patchset.md @@ -0,0 +1,57 @@ +# Submitting a patchset + +## Quick start for the familiar + +``` +git config sendemail.to '~cadence/tube-devel@lists.sr.ht'` +git checkout -b my-cool-changes +$EDITOR +git send-email master +``` + +## About patchsets + +On sourcehut, rather than using merge requests, people contribute code +by emailing a patchset of their changes to a public mailing list. + +A patchset is a set of changes in text form that can be applied as +commits to a git repository. + +## git-send-email.io + +This article takes information from [https://git-send-email.io][gse], which +includes an interactive tutorial which allows you to practise sending +patchsets. If you'd like to practise, you should go there now and follow +the tutorial. Otherwise, keep reading this article to learn what you +need to do for CloudTube/NewLeaf specifically. + +[gse]: https://git-send-email.io + +## Submitting a patchset + +(You'll need to first configure git for email as described on +git-send-email.io.) + +If you haven't yet, clone the repository that you want to edit. + +- `git clone https://git.sr.ht/~cadence/cloudtube` +- `git clone https://git.sr.ht/~cadence/NewLeaf` +- `git clone https://git.sr.ht/~cadence/tube-docs` + +Set the default email address: `git config sendemail.to '~cadence/tube-devel@lists.sr.ht'` + +Create a topic branch to work on: `git checkout -b my-cool-changes` + +Make the changes you want to make using a text editor. + +Add and commit your changes to the topic branch. + +Email the patch to the mailing list: `git send-email master` + +(`master` here represents which commits you want to send. Everything _after_ the specified revision will be sent, so `master` will send everything on your topic branch. You can also try `HEAD^` to send the latest commit, `HEAD^3` to send the latest 3, or `abcdef1` to send everything after a specific commit.) + +If you're asked to make changes, it's okay to use `git commit --amend` and `git rebase` if you wish to, to make the history tidier. When you've made the changes, use `git send-email -v2 master`. If you have to go back for a third attempt, use `-v3`, and so on. + +If you run into problems, you can ask for help [on matrix] or by composing an email to `~cadence/tube-devel@lists.sr.ht`. + +[on matrix]: https://matrix.to/#/#cloudtube:matrix.org