Closed szabgab closed 2 years ago
The test data from libgit2 and rugged is included via git submodules. You probably need to fetch them as well.
git submodule init && git submodule update
should do that. Alternatively, you could run git clone
with --recurse-submodules
.
This extra step should be mentioned in the README.
However, I would suggest to import these remote repositories with git-subtree
. Subtrees are IMO way easier to use and reason about than submodules. The main difference is that submodule only keeps a reference to the remote repository (hence you need to explicitly fetch the contents) whereas subtree includes the entire content of the remote repository (but it keeps track on where it came from and it's easy to pull in upstream changes).
Now it fails on my computer with this error:
Failures:
1) Git::Diff patch and to_s
Failure/Error: deltas.size.should eq(2)
Expected: 2
got: 5
# spec/diff_spec.cr:134
and on the GitHub Actions with this: https://github.com/szabgab/libgit2.cr/runs/2907767480?check_suite_focus=true
I wonder if the source of these errors is that I use sudo apt-get install -y libgit2-dev
to install the external dependency insead of compiling from source as it is done in the .travis.sh
With the PR https://github.com/smacker/libgit2.cr/pull/14, is it safe to close this issue?
After cloning the repository and installing
sudo apt-get install -y libgit2-dev
I ran