Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:howto:contribute [2013/02/02 13:17] jannisdev:howto:contribute [2020/05/17 21:37] (current) – [Contributing to Xfce] skunnyk
Line 1: Line 1:
 ====== Contributing to Xfce ====== ====== Contributing to Xfce ======
  
 +<note important>This page is outdated. Replaced by https://docs.xfce.org/contribute/start and https://docs.xfce.org/contribute/dev/start</note>
 ===== Purpose of this document ===== ===== Purpose of this document =====
  
-At the time of writing (FOSDEM 2013), the entry barrier for contributing to Xfce is substantially higher than it could be. There are several hurdles that people have to figure out themselves. There is no easily accessible list of low-hanging fruit or tasks to get started with. Also, there is no definedtransparent contribution process. Our aim should be to make obvious to interested developers how they can contribute and what they can contribute.+At the time of writing (FOSDEM 2013), the entry barrier for contributing to Xfce is substantially higher than it could be. There are several hurdles that people have to figure out themselves. There is, for example, no easily accessible list of low-hanging fruit and tasks to get started with. Also, there is no well-defined and transparent contribution process. Our aim should be to make it obvious to interested developers how they can contribute and what they can start with.
  
-The purpose of this document is to come up with a concept for providing low-hanging fruit to the developer community and a contribution process that removes uncertainty about what the right way/format of contributing code is. This document is only about contributing code since other areas, like [[http://xfce.org/getinvolved/translation|translations]], are already well documented.+The purpose of this document is to come up with a concept for providing low-hanging fruit to the developer community and a contribution process that removes uncertainty about what the right way/format of contributing code is. 
 + 
 +This document is only about contributing code since other areas, like [[http://xfce.org/getinvolved/translation|translations]], are already well documented.
  
 ===== Present State ===== ===== Present State =====
Line 27: Line 30:
 ===== Proposals ===== ===== Proposals =====
  
-==== Low-Hanging Fruit ====+==== Presenting Low-Hanging Fruit ====
  
 ==== Contribution Process ==== ==== Contribution Process ====
 +
 +The contribution process aims to provide new contributors with a simple step-by-step process to create and submit changes to Xfce. It is inspired by how the Linux kernel community handles contributions.
 +
 +=== 1. Clone and branch ===
 +
 +When you start working on a fix or new feature, clone the relevant repository (e.g. Thunar) and branch off the main development branch (master):
 +
 +  git clone git://git.xfce.org/xfce/thunar
 +  cd thunar
 +  git checkout -b <your name>/<branch name>
 +
 +=== 2. Write code ===
 +
 +Work on your fix or feature in the branch you created. Important:
 +
 +  * Make sure to commit frequently.
 +  * Make sure to pull in the latest Xfce master frequently.
 +  * Keep commits clean:
 +    * Make incremental, atomic changes (one aspect at a time).
 +    * Keep code working after every commit.
 +    * Comment the code you write.
 +    * Write commit messages using the standard Git message format.
 +    * Don't fear the rebase (against the Xfce master branch).
 +
 +=== 3. Push ===
 +
 +Before submitting your changes for review, it is a good idea to push them to a public repository, e.g. on GitHub. This will make it easier for others to check out your branch and test it as part of their reviews. It also simplifies the merging process.
 +
 +=== 4. Submit for review ===
 +
 +Submitting your changes for review is as simple as running a single command. In your branch, run:
 +
 +  git send-email --suppress-cc=self --annotate --cover-letter origin/master --to=xfce4-dev@xfce.org
 +
 +This will drop you in an editor where you are being asked to define a subject and a message for the patch set you are submitting. The editor window will roughly look like this:
 +
 +  From 451e2ab7ea3d595476ec5e57f33da8eef1661773 Thu Jan 10 08:30:27 2013
 +  From: Jannis Pohlmann 
 +  Date: Thu, 10 Jan 2013 09:25:18 +0100
 +  Subject: [PATCH 0/2] ***SUBJECT***
 +  
 +  ***MESSAGE***
 +  
 +  ... auto-generated git log and diff stats ...
 +
 +Fill out the SUBJECT and MESSAGE by briefly describing what you are submitting. Then save the file and close the editor. ''git send-email'' will send your patch set to the ''xfce4-dev@xfce.org'' mailing list in the form of the above cover letter email, followed by an additional email for each commit in your branch. These mails will each include the commit message and the commit diff as plain text.
 +
 +**Configuring ''git send-email''**
 +
 +You will need to configure a number of items for ''git send-email'' to function usefully. At minimum, you need to tell it how to actually send emails. This can be done with the following
 +
 +  git config --global sendemail.smtpserver mail.example.com
 +  git config --global sendemail.smtpserverport 25
 +
 +If you need encryption to use your mail server, set:
 +
 +  git config --global sendemail.smtpencryption starttls
 +
 +If you need to log in to your server, you can set the user name in the config and then git send-email will prompt you for the password during the sending process.
 +
 +  git config --global sendemail.smtpuser yourmailusername
 +
 +You need to teach git send-email what name and address to send the emails from. This might need to change from project to project, but if not, then:
 +
 +  git config --global sendemail.from "$(git config user.name) <$(git config user.email)>"
 +
 +=== 5. Review ===
 +
 +Once submitted to ''xfce4-dev@xfce.org'', your patches will be reviewed by other Xfce developers. These reviews should include:
 +
 +  * Testing the changes.
 +  * Comments on:
 +    * Coding style and bad code design.
 +    * Potential issues.
 +    * Possible side-effects.
 +
 +The reviews will be sent as replies to your cover letter and patch emails. Thanks to having the patches included in your submission as plain text, they can be commented on in-line.
 +
 +Reviews may be performed in multiple rounds. If your submission is rejected, you are advised to rework your branch and re-submit it using the same approach as described above. 
 +
 +=== 6. Merge ===
 +
 +Once you get an ok, one of the reviewers will pull your branch into the official repository and merge as follows:
 +
 +  git checkout master
 +  git merge --no-ff <your username>/<branch name>
 +  
 +This will result in an explicit merge commit, confirming in the git history that your changes have been merged.
 +
 +At the bottom of the merge commit message, the reviewer should add the following lines:
 +
 +  Signed-off-by: <your name> <your email>
 +  Reviewed-by: <reviewer 1> <reviewer 1 email>
 +  Reviewed-by: <reviewer 2> <reviewer 2 email>
 +  
 +These fields are defined in the [[http://www.kernel.org/doc/Documentation/SubmittingPatches|Linux kernel contribution guidelines]] and are used to confirm authorship and code reviews.