-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi import git [url] #9
Comments
I have a working implementation of this I just committed. I need to document it in the getting started guide.
Only one of dir or url is required and it will create a new multiverse repo in the same directory with the name you pass. I tested importing a repo with around 1700 commits and it finished in about a second. |
Got an error while trying an import. Import command:
I get:
|
Are you able to clone that url using git? |
I am able to clone with git. First clone was slow because the IPFS node on my workstation didn't have it locally. Deleting and cloning a second time was quick.
|
I looked into it and go-git does not support the "dumb" http git protocol. (see https://github.com/go-git/go-git/blob/master/COMPATIBILITY.md) In the mean time cloning and importing using the |
Understood. I'll use git clone then --dir for these repo migrations. If go-git exposes that error in a way that you can detect, an error message reporting that the dumb http git protocol is not currently supported, and present a workaround would help prevent any future issue reports about this by other people. |
Found another failing import. Trying to import a clone of https://github.com/hsoft/collapseos results in an error:
|
That project is using a submodule, which is not handled by the importer currently. I'll have to figure out how submodules work and what the best way to import them would be. |
I found a good work around for now. When the importer encounters a submodule it will add an empty directory. I added a test case for the repository above and it imported successfully. I will work on proper submodule support once I finish up what I'm currently working on. |
Moved to #14 |
Add a subcommand to import an existing git repository along with its complete history into multiverse.
The subcommand should have two forms:
multi import git
- import the git repository that is in the current working directory or a parent directory. Should automatically find the .git/ directory and setup the multiverse repository there.multi import git [url]
- clone the git repository at [url] and convert it to a multiverse repository. Mostly equivalent togit clone [url]
followed bymulti init repo_dir
. Should store [url] value in repo configuration to allow for pulling upstream updates.This should ease the transition of existing projects to multiverse.
The text was updated successfully, but these errors were encountered: