Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 0114cb163c18c3429af8ae86ee4a819d4736821c Author: Simon Wunderlich sw@simonwunderlich.de Date: Sat Mar 26 17:31:03 2011 +0000
doc: open-mesh/UsingBatmanGit
0114cb163c18c3429af8ae86ee4a819d4736821c open-mesh/UsingBatmanGit.textile | 103 +++++++++++++++------------------------ 1 file changed, 38 insertions(+), 65 deletions(-)
diff --git a/open-mesh/UsingBatmanGit.textile b/open-mesh/UsingBatmanGit.textile index 1a6a9da0..0d6d8d94 100644 --- a/open-mesh/UsingBatmanGit.textile +++ b/open-mesh/UsingBatmanGit.textile @@ -1,37 +1,29 @@ -= Using the batman git repositories = +h1. Using the batman git repositories
-{{{ -#!div style="width: 40em; text-align: justify" +If you want to find out why we also have a git repository now, please read [[2009-10-23-batman-goes-mainline|here]].
-If you want to find out why we also have a git repository now, please read [wiki:2009-10-23-batman-goes-mainline here]. +h2. Checkout
-=== Checkout ===
To retrieve the latest changes you can pull from the read-only http frontend. -}}}
-{{{ -git clone http://git.open-mesh.org/batman-adv.git batman-adv-git -}}}
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +git clone http://git.open-mesh.org/batman-adv.git batman-adv-git +</pre>
There is also a repository for kernel integration. You are about to download 300MB of sources - that may take a while! -}}}
-{{{ +<pre> git clone http://git.open-mesh.org/ecsv/linux-merge.git/ -}}} +</pre>
-{{{ -#!div style="width: 40em; text-align: justify" +h2. Branches
-=== Branches ===
The main git repository is divided into several branches to make working easier.
-'''master branch''' +h3. master branch
The master branch is a clone of the batman kernel module SVN found at http://downloads.open-mesh.org/svn/batman/trunk/batman-adv/
@@ -39,109 +31,90 @@ The idea is that all upcoming changes are built on top of the SVN, so that chang
In fact you will never work with this branch itself but one of the other branches.
-'''next branch''' +h3. next branch
The next is a branch only maintained in git to gather bug fixes for the latest release and well tested features taken from the master branch. Cherry-pick is used to get commits from the master branch and git-am to insert patches from mailboxes.
Create branch associated with the remote-tracking branch after cloning the repository -}}}
-{{{ + +<pre> git checkout -b next --track origin/next -}}} +</pre>
Cherry-picking a commit from master branch
-{{{ +<pre> git checkout next git cherry-pick $SHA1 -}}} - -{{{ -#!div style="width: 40em; text-align: justify" +</pre>
-'''maint branch''' +h3. maint branch
The maint is a branch only maintained in git to gather bug fixes and only bugfixes for the last release which were usually picked from next.
Create branch associated with the remote-tracking branch after cloning the repository -}}}
-{{{ +<pre> git checkout -b maint --track origin/maint -}}} +</pre>
Cherry-picking a commit from next branch
-{{{ +<pre> git checkout maint git cherry-pick $SHA1 -}}} +</pre>
-{{{ -#!div style="width: 40em; text-align: justify" - -=== Linux integration === +h3. Linux integration
The linux-merge repository is a clone of Linus Torvalds developer branch. With the help of some git voodoo the next branch is merged with this branch in the folder: net/batman-adv/. If you wish to merge the latest next branch changes into the linux branch you need to pull the newest changes in next from the batman-adv-git repository (we assume that you created the next branch in your local linux-merge repsitory as explained above): -}}}
-{{{ +<pre> git checkout standalone/next git pull http://git.open-mesh.org/batman-adv.git next -}}} +</pre>
and merge the next branch into this one:
-{{{ +<pre> git checkout merge/master git merge -s subtree standalone/next -}}} - -{{{ -#!div style="width: 40em; text-align: justify" +</pre>
If you wish to pull Linus latest changes and merge it you need to add the remote branch first (you can omit that step if you already have it). -}}}
-{{{ +<pre> git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git -}}} +</pre>
Fetch its content and merge it:
-{{{ +<pre> git checkout merge/merge git fetch torvalds git merge torvalds/master -}}} +</pre>
To upload your changes you need to run: -{{{ +<pre> git push -}}} +</pre>
-{{{ -#!div style="width: 40em; text-align: justify"
-'''difference between next and linux-integration''' +h3. difference between next and linux-integration
If you need to see the difference between the next branch and the batman-adv driver in net/batman-adv/ you can run this command: -}}}
-{{{ +<pre> git diff standalone/next: merge/master:net/batman-adv/ -}}} - -{{{ -#!div style="width: 40em; text-align: justify" +</pre>
-'''adding a branch''' +h3. adding a branch
In case you want to add your own branch for testing purposes or simply wish to understand the magic. -}}}
-{{{ +<pre> git remote add $remote_name $git_url git fetch $remote_name
@@ -149,4 +122,4 @@ git checkout -b $new_branch_name $remote_name/master git merge -s ours --no-commit next git read-tree --prefix=net/batman-adv/ -u next git commit -m "Add batman-adv to my new branch" -}}} +</pre>