FlightGear Git: splitting FGData

From FlightGear wiki
Revision as of 12:33, 16 October 2011 by Gijs (talk | contribs)
Jump to navigation Jump to search

Aircraft are split to seperate 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

You need to have up-to-date fgdata to do this. There are two workflows that both do the trick.

Expect one aircraft to take 5-30 minutes (depending on the filesizes, number of commits (date of last commit?) etc.).

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