Closed GaryBoone closed 1 year ago
It looks like svn
hasn't been installed yet. If you are using macOS, you can install svn using homebrew. Using brew install svn
to install it first.
While that makes sense, none of the zinit documentation that I've found has said that svn needs to be installed. Seems strange to need another protocol other than Git to download from Github. My reading was that zinit used the svn protocol, which GitHub supports, not that svn was required.
I just noticed this comment on the wiki under Cloning Options
/svn
: "Does not work with plugins." So maybe this is a known issue.
Maybe this bug should be changed to be "Support multiple file downloads with Git".
@GaryBoone @dnanhkhoa,
While that makes sense, none of the zinit documentation I've found has said that svn needs to be installed.
I agree the documentation needs some updating and elaboration of certain features.
Warning: Subversion not found, please install it to use `svn' ice.
However, I will point out that the error message states you need to install Subversion.
Seems strange to need another protocol other than Git to download from Github. My reading was that zinit used the svn protocol, which GitHub supports, not that svn was required.
You're technically correct Git supports SVN, but it isn't quite that cut and dry.
The git-svn
subcommand is implemented as a perl script, see here. The script expects that the package SVN::Core
is installed otherwise exits. And on the SVN::Core CPAN (perl package manager) page has the following message:
If you are looking for SVN::Core, it gets built with the Subversion binaries on your system, and is not available on CPAN. You need to specify at configure time if it should be built and installed. If your OS app packaging didn't do that for you then check
So to to run git-svn
you need Subversion installed.
Maybe this bug should be changed to be "Support multiple file downloads with Git".
This is the exact reason Subversion was used. Subversion allows for easily cloning directory/file within a repository. At the time Zinit was created, it was not possible with git. However, it is now supported, but it is a messy process.
# Create a directory, so Git doesn't get messy, and enter it
mkdir my-dir && cd my-dir
# Start a Git repository
git init
# Track repository, do not enter subdirectory
git remote add -f origin https://github.com/ohmyzsh/ohmyzsh/
# Enable the tree check feature
git config core.sparseCheckout true
# Create a file in the path: .git/info/sparse-checkout
# That is inside the hidden .git directory that was created
# by running the command: git init
# And inside it enter the name of the sub directory you only want to clone
echo 'files' >> .git/info/sparse-checkout
## Download with pull, not clone
git pull origin main
svn export https://github.com/ohmyzsh/ohmyzsh/trunk/<directory>
We will be forced to update to using git at some point due to sunsetting SVN support. This has been brought up in #465.
Thanks for clearly documenting the issue here. Summarizing, it sounds like the resolutions are to either: 1) incorporate the messy Git process into zinit 2) wait for direct Git support and clarify the documentation with a note that SVN is required until then.
@GaryBoone,
Closing issue in favor of #504 for tracking progress on removing the Subversion dependency.
What happened?
I'm unable to figure out how to load an OMZ plugin that has more than one file. In particular, aliases is implemented in Python, so
cheatsheet.py
from the same directory must also be downloaded.From the wiki, "Snippets are single files..." and "Moreover, snippets support Subversion protocol, supported also by Github. This allows to load snippets that are multi-file..." Here is the example given there:
Steps to reproduce
However, when I add to my
.zshrc
:Relevant output