This tool allows you to transform a git repository into a fossil repository. It does so by using the 'fast-export' sub command of recent git releases.
Please Note:
- Previous versions of fossil are missing the 'reconstruct' command that this script depends on. Please use a current release
- Currently this script does not work on MS Windows because of limitations in the Windows file system.
To Clone:
fossil clone http://code.linuxfood.net/pub/repo/git-import git_import.fsl
At present it ignores several things:
- symlinks - fossil doesn't support these
- branches - any time a git repo branches it's treated as a leaf in fossil. It works out to be basically the same.
Both of those are things which may be fixed in a future release, at present, however, it's usually sufficient to recreate the tags and branches by hand.
You can get started with it by cloning this repository and running:
import-git-export.pl <path to git checkout>
By default it transforms the resultant git-history.txt
into a series of artifacts under artifacts/
.
You can control the output directory by running it like so:
import-git-export.pl <path to git checkout> <artifacts dir>If the directory doesn't exist, it will be created for you.