Changes between Version 4 and Version 5 of Developer/Git/Users


Ignore:
Timestamp:
Mar 4, 2012, 11:19:11 PM (7 years ago)
Author:
Gedare
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Git/Users

    v4 v5  
    248248= Creating a Patch =
    249249
    250 Before submitting a patch read about [wiki:Developer/Contributing Contributing] to RTEMS. A patch is a text file containing the difference between an old and new version of code. Patches against current development (git head) are preferred to patches against releases unless your patch is intended as a bug fix candidate for a release branch. Send one patch for each logical change made. Each patch you submit should be impossible to subdivide into more patches because of dependencies between the changed parts. Patches that fix code formatting to conform to [wiki:Developer/Coding/Conventions our standards] are best not mixed with substantive changes and vice versa, because the code reformatting hides the functional changes.
     250Before submitting a patch read about [wiki:Developer/Contributing Contributing] to RTEMS.
    251251
    252252The recommended way to create a patch is to branch the [wiki:Git git repository] master and use one commit for each logical change. Then you can use ''git-format-patch'' to turn your commits into patches and easily submit them.
     
    254254 git format-patch master
    255255}}}
    256 Creates a separate patch for each commit that has been made between the master branch and the current branch and writes them in the current directory. Use the -o flag to redirect the files to a different directory. These files, appended with .patch, are formatted so they can be emailed and rely on having git configured with your name and email address, for example
     256Creates a separate patch for each commit that has been made between the master branch and the current branch and writes them in the current directory. Use the -o flag to redirect the files to a different directory.
     257
     258Patches created using ''git-format-patch'' are formatted so they can be emailed and rely on having git configured with your name and email address, for example
    257259{{{
    258260 git config --global user.name "Your Name"
    259261 git config --global user.email name@domain.com
    260262}}}
    261 
    262 If you do not have the Git repository available then you can use the diff program to create a patch by comparing an unmodified RTEMS against the version containing your changes with ''diff -up rtems rtems-new'' and redirect the output to a file.
    263 
    264 We prefer patches posted as plain text. If the patch is too big posting it gzipped is acceptable but it would be better as a branch that can be pulled/reviewed. Submit your patch to the [wiki:RTEMSMailingLists_  rtems-devel mailing list] and if the patch fixes a bug, file a PR on the [wiki:Bugzilla Bugzilla].
     263= Submitting a Patch =
     264
     265Using ''git-send-email'' you can easily [wiki:Developer/Contributing contribute] your patches. You will need to install ''git-send-email'' first:
     266{{{
     267 yum install git-email
     268}}}
     269or
     270{{{
     271 apt-get install git-send-email
     272}}}
     273
     274Then you will need to configure an SMTP server. You could install one on your localhost, or you can connect to a mail server such as gmail.
     275= Configuring git-send-email to use GMail =
     276
     277Configure git to use gmail:
     278{{{
     279 git config --global sendemail.smtpserver smtp.gmail.com
     280 git config --global sendemail.smtpserverport 587
     281 git config --global sendemail.smtpencryption tls
     282 git config --global sendemail.smtpuser your_email@gmail.com
     283}}}
     284It will ask for your password each time you use ''git-send-email''. Optionally you can also put it in your git config:
     285{{{
     286 git config --global sendemail.smtppass your_password
     287}}}
     288= Sending Email =
     289
     290To send your patches just
     291{{{
     292 git send-email /path/to/patch --to rtems-devel@rtems.org
     293}}}
     294
     295To send multiple related patches (if you have more than one commit in your branch) specify a path to a directory containing all of the patches created by ''git-format-patch''.
     296
     297''git-send-email'' has some useful options such as --annotate which shows you your patch and --cover-letter which prepends a summary email.
     298
     299You can configure the to address:
     300{{{
     301 git config --global sendemail.to rtems-devel@rtems.org
     302}}}
     303
     304So all you need is:
     305{{{
     306 git send-email /path/to/patch
     307}}}
    265308=  Troubleshooting  =
    266309