Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, path: str, conf=None):
"""
Init the Git RepositoryMining.
:param str path: path to the repository
"""
self.path = Path(path)
self.project_name = self.path.name
self.lock = Lock()
self._git = None
self._repo = None
# if no configuration is passed, then creates a new "emtpy" one
# with just "path_to_repo" inside.
if conf is None:
conf = Conf({
"path_to_repo": str(self.path),
"git_repo": self
})
self._conf = conf
self._conf.set_value("main_branch", None) # init main_branch to None
"reversed_order": reversed_order,
"only_in_branch": only_in_branch,
"only_modifications_with_file_types":
only_modifications_with_file_types,
"only_no_merge": only_no_merge,
"only_authors": only_authors,
"only_commits": only_commits,
"only_releases": only_releases,
"skip_whitespaces": skip_whitespaces,
"filepath": filepath,
"filepath_commits": None,
"tagged_commits": None,
"histogram": histogram_diff,
"clone_repo_to": clone_repo_to
}
self._conf = Conf(options)