Changes

→‎Patch submission: send-email configuration, add examples
Line 45: Line 45:  
* mention your changes in a changelog below the marker line (the one with just <code>---</code> on it). E.g.:
 
* mention your changes in a changelog below the marker line (the one with just <code>---</code> on it). E.g.:
 
  v1->v2: break up _recurse_dir into smaller functions
 
  v1->v2: break up _recurse_dir into smaller functions
 +
 +
You will first need to set up <code>git send-email</code> so it can send emails through your mail provider. The manual page contains an [http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html#_use_gmail_as_the_smtp_server example for Gmail users]. You can use the [[Service/smtp|sugarlabs.org SMTP server]] if you have a [[Sysadmin/Shell account request|shell account]]. Feel free to ask for help with setting up <code>git send-email</code> in [[IRC#irc.freenode.net_channels|#sugar]] or on [[Mailing Lists#Developer Lists|sugar-devel]].
    
Recommended git user configuration:
 
Recommended git user configuration:
Line 51: Line 53:  
* <code>git config --global sendemail.confirm always</code>
 
* <code>git config --global sendemail.confirm always</code>
 
* <code>git config --global 'url.gitorious@git.sugarlabs.org:.pushInsteadOf' git://git.sugarlabs.org/</code>
 
* <code>git config --global 'url.gitorious@git.sugarlabs.org:.pushInsteadOf' git://git.sugarlabs.org/</code>
 +
* <code>git config --global alias.send-to-ml-single '!git send-email --stat'</code>
 +
* <code>git config --global alias.send-to-ml-series '!git send-email --cover-letter --summary --annotate --stat'</code>
 +
 +
If you agree to publish your changes under the same license as the software you are changing, please add <code>-s</code> to the two aliases above (send-to-ml-single and send-to-ml-series). If you don't agree, don't post the patch! The reason this is mentioned as a separate step instead of adding it to the examples above is so you need to make a conscious decision and can't sue us for copyright infringement.
    
Recommended per-repository git configuration, e.g. for sugar-datastore:
 
Recommended per-repository git configuration, e.g. for sugar-datastore:
Line 61: Line 67:     
* <code>git config --global merge.conflictstyle diff3</code>
 
* <code>git config --global merge.conflictstyle diff3</code>
* <code>git config --global alias.send-to-ml-single '!git send-email -s -p --stat'</code>
  −
* <code>git config --global alias.send-to-ml-series '!git send-email --cover-letter --summary --annotate -s -p --stat'</code>
   
* <code>git config format.headers "Mail-Followup-To: &lt;sugar-devel@lists.sugarlabs.org&gt;"</code>
 
* <code>git config format.headers "Mail-Followup-To: &lt;sugar-devel@lists.sugarlabs.org&gt;"</code>
 
* <code>git config sendemail.envelopesender sascha-ml-sugar-devel@dev.null</code>
 
* <code>git config sendemail.envelopesender sascha-ml-sugar-devel@dev.null</code>
   −
If you agree to publish your changes under the same license as the software you are changing, please add <code>-s</code> to the two aliases above (send-to-ml-single and send-to-ml-series). If you don't agree, don't post the patch! The reason this is mentioned as a separate step instead of adding it to the examples above is so you need to make a conscious decision and can't sue us for copyright infringement.
+
Examples (assuming the above configuration, including the aliases):
    +
* <code>git send-to-ml-single HEAD^..HEAD</code>
 +
* after doing the code changes requested during review:
 +
** <code>git commit -a --amend</code>
 +
** <code>git send-to-ml-single --annotate --subject-prefix="PATCH v2 sugar"</code>
 +
*** add the changelog during this step
 +
*** adjust the subject prefix to use the name of the module you're modifying instead of <code>sugar</code>
    
== Discussion ==
 
== Discussion ==
344

edits