gotec / git2net

An Open Source Python package for the extraction of fine-grained and time-stamped co-editing networks from git repositories.
https://git2net.readthedocs.io
GNU Affero General Public License v3.0
53 stars 16 forks source link

Support for local repositories #18

Closed SebastianZug closed 3 years ago

SebastianZug commented 3 years ago

If you apply git2net on a local repository without remote origin, the crawling process crashes in line 1526.

   'repository': git_repo.repo.remotes.origin.url

Replacing the url reading from pydriller by a placeholder solves the problem. Should we integrate an additional parameter that implements this mechanism as a feature?

Sebastian

gotec commented 3 years ago

Hi Sebastian,

I have just implemented a fix for this. Now, if no URL can be read from the repository, the local path to the repository will be used as identifier.

Would you mind trying if it works for you before I push a new version of git2net to PyPI? You can do so by cloning a copy of git2net to your machine and then installing with pip install -e . from within the cloned repository.

Cheers, Christoph

SebastianZug commented 3 years ago

Thanks for providing an official solution :-)

gotec commented 3 years ago

I have now released a version with this change in git2net 1.4.9. Feel free to reopen this issue in case there are any further issues with this.

Cheers, Christoph