Jump to: navigation, search

Difference between revisions of "Development Resources/Handling Git Contributions"

(Provenance, Rights, and License)
Line 8: Line 8:
 
# Contributor or project committer creates a bugzilla that includes a URL pointer to the commit record in the source repository.  
 
# Contributor or project committer creates a bugzilla that includes a URL pointer to the commit record in the source repository.  
 
# A copy of the code is attached (in patch format, see below) to the Bugzilla entry for archival purposes.
 
# A copy of the code is attached (in patch format, see below) to the Bugzilla entry for archival purposes.
# The contributor provides a statement regarding the provenance, rights, and license of the code (see below)
+
# The contributor provides a statement regarding the provenance, rights, and license of the code:
 +
#* "I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use."
 
# If required by the IP Due Diligence Process (e.g. if the contribution exceeds 250 lines), the committer creates a CQ and waits for "check in" permission
 
# If required by the IP Due Diligence Process (e.g. if the contribution exceeds 250 lines), the committer creates a CQ and waits for "check in" permission
 
# Project committer merges the pull request back into the eclipse.org project git repository.   
 
# Project committer merges the pull request back into the eclipse.org project git repository.   
Line 18: Line 19:
  
 
<pre>git show [commit] > patch.txt</pre>
 
<pre>git show [commit] > patch.txt</pre>
 
==Provenance, Rights, and License==
 
 
We require that the contributor assert the following on each contribution ''before'' any code is introduced into an eclipse.org repository:
 
 
"I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use."
 
 
A link to the ''eclipse.org web site terms of use'' is found at the bottom of every page.
 
  
 
=Gerrit=
 
=Gerrit=
  
 
Gerrit provides facilities to capture all of the required information and can be used to do so. As of this writing, however, only the EGit and JGit projects have been authorized by the Eclipse Foundation to use Gerrit. Implementing Gerrit is a priority for the webmaster and we are hopeful that it will be addressed in the near future.
 
Gerrit provides facilities to capture all of the required information and can be used to do so. As of this writing, however, only the EGit and JGit projects have been authorized by the Eclipse Foundation to use Gerrit. Implementing Gerrit is a priority for the webmaster and we are hopeful that it will be addressed in the near future.

Revision as of 15:30, 17 February 2011

Git makes it easy to pull contributions from other repositories and make them part of your own. It feels wrong to do the same thing we do with CVS: attach a patch that is later added to the repository by a committer. The natural thing to do in Git is to pull the contribution in question from the contributor's Git repository. Regardless of the mechanism used to actually get the code into an Eclipse project's Git repository, the Eclipse IP Policy and Due Diligence Process must be followed.

Scenario

An individual has forked one of the eclipse.org projects and has issued a pull request for a commit record that they would like to contribute to the eclipse.org project.

  1. Eclipse project committer agrees the contribution is something they would like to include in their project.
  2. Contributor or project committer creates a bugzilla that includes a URL pointer to the commit record in the source repository.
  3. A copy of the code is attached (in patch format, see below) to the Bugzilla entry for archival purposes.
  4. The contributor provides a statement regarding the provenance, rights, and license of the code:
    • "I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use."
  5. If required by the IP Due Diligence Process (e.g. if the contribution exceeds 250 lines), the committer creates a CQ and waits for "check in" permission
  6. Project committer merges the pull request back into the eclipse.org project git repository.
    • Note that the committer does not need to take the code from bugzilla.

Patch Format

The Git show command can be used to generate a "patch format" suitable for attachment to the bug:

git show [commit] > patch.txt

Gerrit

Gerrit provides facilities to capture all of the required information and can be used to do so. As of this writing, however, only the EGit and JGit projects have been authorized by the Eclipse Foundation to use Gerrit. Implementing Gerrit is a priority for the webmaster and we are hopeful that it will be addressed in the near future.