-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Formatting and sending patches
You commit locally to your git tree and then prepare patches that you send to the mailing list.
First, make your name and email address are configured for git:
$ git config user.name "Your Name"
$ git config user.email "[email protected]"
Also configure git to detect renames and copies to make git format-patch
output easier to review:
git config --global diff.renames copies
Additionally configure git to order the files in the patch according to our conventions (headers first): Run (in your repo):
git config diff.orderFile .gitorderfile
An example .gitorderfile is like follows:
*.py
*.txt
*.g
*.rl
*.h
*.hh
*.c
*.cc
*
Then, make your modifications in your own private branch:
$ git checkout -b features/foo # branches from master
To commit changes, do:
$ git commit -a --signoff # commit everything
Please prepare a commit message for every commit:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
https://chris.beams.io/posts/git-commit/
Once you have commits you want to send out, you can use git send-email to generate and send them. [1]
For multiple patches, use:
$ git send-email -n -v1 --cover-letter --annotate master..
for a single patch:
$ git send-email -1 -v1
(you can use --annotate
to add details, and adjust -v1
for follow-up versions).
You can also use git format-patch
and git send-mail
separately if you prefer.
git config sendemail.smtpencryption tls
git config sendemail.smtpserver smtp.googlemail.com
git config sendemail.smtpuser [email protected]
git config sendemail.smtpserverport 587
You can find more details on how to configure git to use Gmail here:
http://morefedora.blogspot.se/2009/02/configuring-git-send-email-to-use-gmail.html
Without 2FA on your Google account it is possible to work with LSA (less secure apps) enabled (Account settings -> Security -> Less Secure Apps).
If you use 2FA on your account you need an application-specific password. You can generate an application-specific password and use that for git-send-email at:
https://myaccount.google.com/apppasswords [how]
After you sign in, select App ("Mail") and Device ("Other", followed by anything), then select "Generate".
You can save SMTP password in your git configuration as follows:
$ git config --global sendemail.smtppass "<password>"
Arch has 2 issues related to the git send-email
:
- https://bugs.archlinux.org/task/36506 "Not using SSL_VERIFY_PEER due to out-of-date IO::Socket::SSL."
- https://bugs.archlinux.org/task/20923 "Need MIME::Base64 and Authen::SASL todo auth at /usr/lib/git-core/git-send-email line 1093."
To fix them and make git send-email
work execute:
sudo pacman -S perl-io-socket-ssl perl-mime-tools perl-authen-sasl