(no commit message)
[openafs-wiki.git] / AFSLore / GitDevelopers.mdwn
index 86f4c35..6aacf18 100644 (file)
@@ -10,7 +10,7 @@ Whilst git is a far more powerful tool than CVS it is also, inevitably, more com
 
 Firstly, if your machine doesn't already have it installed, get a copy of the 'git' version control system. This is available for many platforms from their upstream package repositories or, failing that, can be downloaded in both source and binary form from <http://git-scm.com/download>
 
-## <a name="Getting the _OpenAFS repository"></a> Getting the OpenAFS repository
+## <a name="Getting the _OpenAFS repository"></a> Getting the OpenAFS repository 
 
 You can download the entire OpenAFS repository by running
 
@@ -30,7 +30,7 @@ When you want to update the local repository with the central OpenAFS one, runni
 
     git pull
 
-will pull all of the new changes into your local repository, and merge those changes into your correct working tree. Note that whilst this is fine when you are browsing the repository, you may want to exercise more control over how upstream changes are merged into your development code.
+will pull all of the new changes into your local repository, and merge those changes into your current working tree. Note that whilst this is fine when you are browsing the repository, you may want to exercise more control over how upstream changes are merged into your development code.
 
 ## <a name="Checkout a particular branch"></a> Checkout a particular branch
 
@@ -48,7 +48,7 @@ For example, to checkout the 'openafs-stable-1\_4\_x' branch:
 
     git checkout origin/openafs-stable-1_4_x
 
-Note that if you wish to do development, you should either make a local branch which tracks the remote one, using something like
+Note that if you wish to do development on a particular branch, you should either make a local branch which tracks the remote one, using something like
 
     git checkout -b openafs-stable-1_4_x origin/openafs-stable-1_4_x
 
@@ -99,6 +99,8 @@ If you want to make this settings for all of your repositories, then add the --g
 
 Note that this email address is the address by which you will be identified in [[OpenAFS]]'s revision history - it is also the address to which the gerrit code review tool will send all email related to the review of your code.
 
+If you plan on making changes to OpenAFS (and why else would you be reading this?) you should probably also grab <b>The change id hook</b> described in <b>Registering With gerrit</b> below. You can grab and apply the hook before registering, and it'll make sure your pre-registration development has the appropriate change IDs in the log. The hook only applies to your openafs development, so you're not going to mess up any of your non-OpenAFS work.
+
 ## <a name="Starting development"></a> Starting development
 
 We strongly recommend that you do all of your development upon 'topic branches' This allows you to isolate multiple unrelated changes, and makes it easier to keep your tree in sync with the upstream [[OpenAFS]] one.
@@ -119,7 +121,7 @@ For example, to work on a patch to fix printf warnings, based on the current dev
 
 This puts me on a new branch, ready to start writing code. All new development should be based upon the origin/master branch, submissions based upon other branches are unlikely to be accepted, unless they address issues that are solely present in that branch.
 
-'git add' is used to tell git about any new files you create as part of your patch. If your patch results in any new compilation products (object files, new executables, etc) that git should not be tracking, please make sure that they're caught by the .gitignore mechanism. You can do this by checking that they don't appear in the output from 'git status'
+'git add' is used to tell git about any new files you create as part of your patch. If your patch results in any new compilation products (object files, new executables, etc) that git should not be tracking, please make sure that they're caught by the .gitignore mechanism. You can do this by checking that they don't appear in the output from 'git status'.
 
 'git mv' and 'git rm' are used to move and delete files respectively.
 
@@ -192,7 +194,7 @@ The hook can be downloaded from the [[OpenAFS]] gerrit server by running the fol
 
 When submitting to gerrit, it's important to realise that each commit in your branch will become a changeset in the upstream OpenAFS, typically with no modification at our end. It is therefore important that these commits follow some simple rules...
 
-First, each commit should be complete. The maxim "one change per commit, one commit per change" applies here. Each commit should build and test in its own right. Typically, this means that a change will be in a small number of commits. If, during development, you have created many more than this (for example, you've created a large number of bug fix commits), please use 'git rebase', or cherry pick these commits into a separate tree before uploading them.
+First, each commit should be complete. The maxim "one change per commit, one commit per change" applies here. Each commit should build and test in its own right. Typically, this means that a change will be in a small number of commits. If, during development, you have created many more than this (for example, you've created a large number of bug fix commits), please use 'git rebase', or cherry pick these commits into a separate tree before uploading them.  Note, however, that "one change" could equate to a change to source code and a change to the corresponding documentation for that code specific change.
 
 Secondly, each commit should have a meaningful revision log. The internals of git means that we can't easily edit these before pushing them into the tree, so we'd like you to get them right for us! A commit message should be comprised of a single 'subject' line (which must **not** end with a full stop), followed by a blank line, followed by one or more paragraphs explaining the purpose of the patch. If it is intended to fix a bug in OpenAFS RT, then the word 'FIXES' followed by the bug number or comma-separated list of bug numbers should be included on a line of its own. The 'LICENSE' keyword can be used to indicate code which is covered under a license other than the IPL, although please speak to a gatekeeper if you intend using this. An example commit message would be
 
@@ -233,8 +235,8 @@ Assuming all has gone well, this will have added the entry to the code review qu
 It's possible that your modifications won't be accepted first time. In this case, you need to revise your changes, and resubmit them to gerrit. Please note that this should always be done by modifying your original changeset, _not_ by submitting a new change that makes the required fixes. Either git commit --amend, or git rebase should be used to combine your changes with the original changeset, and then you should push this to gerrit with
 
     git push ssh://gerrit.openafs.org/openafs.git <hash>:refs/changes/<number>
-
-(where &lt;hash&gt; is the sha1 hash of the revised change, and &lt;number&gt; is the change number you received when you originally submitted the patch)
+(where &lt;hash&gt; is the sha1 hash of the revised change that follows the word <tt>commit</tt> in the log message, and &lt;number&gt; is the change number you received when you originally submitted the patch)
 
 You can obtain the sha1 hash of a commit by using 'git show' (if it is on the tip of your current branch), or 'git log' (if it is in your history)