Skip to end of metadata
Go to start of metadata

Sending patches via git is easy for users who are familiar with git, and is the best practice followed by projects like the Linux kernel and those hosted at freedesktop.org. The following assumes familiarity with creating commits with git.

 

Contents


Preparation

Install git-email:

Debian or Ubuntu: apt-get install git-email

Fedora, RHEL or CentOS: yum install git-email

Set up the SMTP server from the machine that you will use for contributing patches.

  • Use Google's servers, assuming you have an account with Google. (You need not use the account for anything else.)

In your global or project .gitconfig file, add the following stanza:

[sendemail]
   smtpencryption = tls
   smtpserver = smtp.gmail.com
   smtpuser = username@gmail.com
   smtpserverport = 587
   from = username2@employer.com
   suppresscc = all

 

  • With employer's servers:

[sendemail]

   smtpserver = mail.employer.com
   smtpuser = myLDAPusername
   from = username@employer.com
   suppresscc = all

 

Discovering the Exchange server SMTP hostname:

  • In Outlook Web App, I navigated to "Options ... See all options."
  • Under "Account" tab, I clicked on "Settings for POP, IMAP and SMTP access."
  • I copied "Server name" from the "IMAP setting" list.

Creating Patches

  • Prepare your patches, preferably with "git format-patch HEAD~n", where n is the number of patches you want to submit.
    • For submissions with more than one patch, use "git format-patch --cover-letter HEAD~n" instead in order to create an empty explanatory document named 0000-cover-letter.patch. Use a text editor to add a summary of your patches to the file.
  • Determine the maintainer of the GENIVI project to wish you plan to submit.

Sending Patches

  • Type the following at a shell prompt from the directory where you have created the patches:

git send-email --subject="[PATCH] summary of patch contents" --to=maintainer@maintaineremployer.com --cc=genivi-projects@lists.genivi.org --cc=username2@personalaccount.com 0000-cover-letter.patch 0001-commit-message.patch Optionally include "--from=" to override the default in your .gitconfig file.

  • What happens next depends on the SMTP server you've used. With employer's Active Directory or LDAP server, you'll need to enter the password you use to login to corporate network, seeing something like

Password for 'smtp://smtpusername@smtpserver.com:25': OK. Log says: Server: smptpserver.com X-Mailer: git-send-email 1.8.4 Result: Queued mail for delivery

Sending an Amended Patch

  • For a second version change the subject to "[PATCHv2] amended version of brilliant contribution".
  • To preserver email threading, add the field

--in-reply-to=random.hash@fqdn.com

where the value of the option is obtained by examining the header of the message to your which you're responding. On Gmail, find this hash by choosing "Show original" from the drop-down menu that allows choosing Reply, Forward, etc.

Resources

 


Transferred from MediaWiki.  Original author and history:
Created:                                
17:22, 12 June 2015‎, Alison
for Latest changes  -> View Page History in this Wiki

 

  • No labels