Skip to content

Make repo subrepoable #8

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

Merged

Conversation

amirebrahimi
Copy link
Contributor

I moved the files to the root and updated the README with instructions on how to clone directly into a project. This is what we did for EditorVR and AutoLOD. I'm looking to make use of the graph visualizer for another project, but will need to subrepo it, so I figured I'd offer this back.

@romainf-unity
Copy link
Contributor

Hmm it's a bit of a problem since I moved them into a specific directory a few months ago: 5aa9fa8

I'll have to check with the Package team as well, I know I want to make this a package, but I don't know don't know what should be the directory pattern for that.

@romainf-unity
Copy link
Contributor

Also, instead of moving all the files, it's possible to do a sparse checkout:
https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository#13738951

@amirebrahimi
Copy link
Contributor Author

Unfortunately sparse checkouts wouldn't be maintained for subrepos. The problem isn't with what directories get checked out, but instead from the need to check out at the root, which precludes a larger Unity project from being version controlled.

If you need to have a separate folder structure for packages, then a good solution is to have a separate repo that subrepos this one (or vice versa) and imports it at a specific location (i.e. if graph-visualizer is subrepo, then graph-visualizer-project would import it at Assets/GraphVisualizer). You'd be back to having what you have now while still allowing other projects to subrepo.

Copy link
Contributor

@romainf-unity romainf-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change to fix in the README, but I'll approve this PR (it is in line with the structure imposed by the package manager)

README.md Outdated
OR

- From the command line change directory to your project's `Assets` directory.
- Run `git clone https://github.com/Unity-Technologies/graph-visualizer` **(Note HTTPS)**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's needed now to precise "https", it's fairly common now, and users will copy/paste the line anyway.

@amirebrahimi
Copy link
Contributor Author

Should be good now

@romainf-unity romainf-unity merged commit e453486 into Unity-Technologies:master Apr 12, 2018
@amirebrahimi amirebrahimi deleted the make-subrepoable branch April 12, 2018 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants