FlightGear Git: splitting FGData: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
Aircraft are split to seperate repositories, under the [https://gitorious.org/flightgear-aircraft FlightGear Aircraft] project at Gitorious.
[[Aircraft]] are split to seperate [[Git]] repositories, under the [https://gitorious.org/flightgear-aircraft FlightGear Aircraft] project at Gitorious.


== Starting new aircraft ==
== Starting new aircraft ==
Line 7: Line 7:


== How to split an aircraft ==
== How to split an aircraft ==
You need to have up-to-date fgdata to do this. There are two workflows that both do the trick.
Please consider splitting your own aircraft and/or some of the others. Spreading the workload makes things go faster ;)


Expect one aircraft to take 5-30 minutes (depending on the filesizes, number of commits (date of last commit?) etc.).
* You need to have up-to-date fgdata to do this.
* Expect one aircraft to take 5-30 minutes (depending on the filesizes, number of commits (date of last commit?) etc.).  
 
There are two workflows that both do the trick:


=== Method 1 ===
=== Method 1 ===

Revision as of 12:44, 16 October 2011

Aircraft are split to seperate Git repositories, under the FlightGear Aircraft project at Gitorious.

Starting new aircraft

New aircraft should not be commited to fgdata. A seperate repository should be created instead. Contact a FlightGear Aircraft admin to get your repository included in the FlightGear Aircraft project. You, as author, will get full admin rights for that repository.

The current fgdata developers will have access to every single aircraft repository. In order to maintain aircraft that no longer have an active author, fix global bugs etc.

How to split an aircraft

Please consider splitting your own aircraft and/or some of the others. Spreading the workload makes things go faster ;)

  • You need to have up-to-date fgdata to do this.
  • Expect one aircraft to take 5-30 minutes (depending on the filesizes, number of commits (date of last commit?) etc.).

There are two workflows that both do the trick:

Method 1

cd fgdata 
git subtree split -P Aircraft/737-300 -b 737-300
cd ../split-aircraft/737-300
git init
git fetch ../fgdata 737-300
git checkout -b master FETCH_HEAD
git push git@gitorious.org:flightgear-aircraft/737-300.git master

Method 2

(need to check this one)

cd fgdata
git clone --no-hardlinks /fgdata /737-300
git filter-branch --subdirectory-filter Aircraft/737-300 HEAD -- --all
git reset --hard
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --aggressive --prune=now