Open eugenk opened 10 years ago
I don't think this is an issue in Rugged itself, but missing functionality in libgit2.
@carlosmn can you confirm whether libgit2 supports shallow clones or not?
libgit2 has not support for shallow histories.
The git client silently ignores the "error" of references to missing parent commits. Could rugged/libgit2 do the same?
I tried to catch the Rugged::OdbError
myself in the code, but then none of the (present) commits are being processed because the error is raised when the iteration begins instead of when the iteration reaches an inexistent commit.
Rugged doesn't support walking through the commits of partially cloned repositories:
In the shell do:
And then in the ruby console do:
which results in
where c84d1b is the parent commit oid.
Rescuing from
Rugged::OdbError
won't help because the walker raises this error as soon as the iterator starts walking - not when trying to find the missing parent commit.This happens regardless of the sorting method (
walker.sorting(Rugged::SORT_REVERSE)
orwalker.sorting(Rugged::SORT_TOPO)
)If the oldest existing commit is a merge commit, then the error is not being raised. However, absolutely nothing happens, i.e. no commits are being iterated over.
The expected behaviour is at least to run through the commits which actually exist and then raise an error.