Difference between revisions of "Adding patches through git"
Line 8: | Line 8: | ||
= Initialising your local repository = | = Initialising your local repository = | ||
− | * You will need to pull down the kernel/patches repository as a starting point with | + | * You will need to pull down the kernel/patches repository as a starting point with <source lang="text"git clone git@git.webos-internals.org:kernels/patches.git</source> . A worked example is as follows: |
<source lang="text"> | <source lang="text"> | ||
Line 39: | Line 39: | ||
= Tag patches and submit to git = | = Tag patches and submit to git = | ||
− | * Find the next available git tag with | + | * Find the next available git tag with <source lang="text"git -l</source> . In the following case, the next tag is v1.4.1-10: |
<source lang="text"> | <source lang="text"> | ||
Line 64: | Line 64: | ||
</source> | </source> | ||
− | * Send the tagged files to the upstream repository with | + | * Send the tagged files to the upstream repository with <source lang="text"git push ; git push --tags</source> as follows: |
<source lang="text"> | <source lang="text"> |
Revision as of 22:48, 22 April 2010
Add patches to be committed to the Preware feed by following this guide.
Prerequisites
- SSH key generated, with the id_dsa.pub authorised for commital on git.webos-internals.org (rhwitby is able to do this)
- GPL compliant patch to submit
Initialising your local repository
- You will need to pull down the kernel/patches repository as a starting point with <source lang="text"git clone git@git.webos-internals.org:kernels/patches.git</source> . A worked example is as follows:
<source lang="text"> mason~/kernels$ git clone git@git.webos-internals.org:kernels/patches.git Initialized empty Git repository in /home/sbromwich/kernels/patches/.git/ Enter passphrase for key '/home/sbromwich/.ssh/id_dsa': remote: Counting objects: 70, done. remote: Compressing objects: 100% (68/68), done. remote: Total 70 (delta 23), reused 0 (delta 0) Receiving objects: 100% (70/70), 15.21 KiB, done. Resolving deltas: 100% (23/23), done. mason~/kernels$ ls patches mason~/kernels$ ls -l total 4 drwxr-xr-x 5 sbromwich sbromwich 4096 Apr 22 22:17 patches mason~/kernels$ cd patches/ mason~/kernels/patches$ ls LICENSE overclocking sensors mason~/kernels/patches$ ls -l total 12 -rw-r--r-- 1 sbromwich sbromwich 88 Apr 22 22:17 LICENSE drwxr-xr-x 2 sbromwich sbromwich 4096 Apr 22 22:17 overclocking drwxr-xr-x 2 sbromwich sbromwich 4096 Apr 22 22:17 sensors mason~/kernels/patches$ </source>
- Create a directory for your patch(es) and copy them in there.
Tag patches and submit to git
- Find the next available git tag with <source lang="text"git -l</source> . In the following case, the next tag is v1.4.1-10:
<source lang="text"> mason~/kernels/patches/prcm$ git tag -l v1.4.0-0 v1.4.0-1 v1.4.1-1 v1.4.1-2 v1.4.1-3 v1.4.1-4 v1.4.1-5 v1.4.1-6 v1.4.1-7 v1.4.1-8 v1.4.1-9 mason~/kernels/patches/prcm$ </source>
- Tag the files with a meaningful commit message and the tag from the previous step:
<source lang="text"> mason~/kernels/patches/prcm$ git tag -a -m "PRCM resume from suspend fix/kludge" v1.4.1-10 mason~/kernels/patches/prcm$ </source>
- Send the tagged files to the upstream repository with <source lang="text"git push ; git push --tags</source> as follows:
<source lang="text"> mason~/kernels/patches/prcm$ git push ; git push --tags Enter passphrase for key '/home/sbromwich/.ssh/id_dsa': Everything up-to-date Enter passphrase for key '/home/sbromwich/.ssh/id_dsa': Counting objects: 1, done. Writing objects: 100% (1/1), 187 bytes, done. Total 1 (delta 0), reused 0 (delta 0) To git@git.webos-internals.org:kernels/patches.git
* [new tag] v1.4.1-10 -> v1.4.1-10
mason~/kernels/patches/prcm$ </source>