From 9f336e63cebf3fad0e797bfd3b3b71971678a7c2 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Fri, 12 May 2017 15:31:28 +0200 Subject: [PATCH] Faulty clone code made it possible to run gitinspector in sub-directories. This resulted in undefined behavior. The base directory was being incorrectly defined when cloning did not occur. --- gitinspector/gitinspector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitinspector/gitinspector.py b/gitinspector/gitinspector.py index b725fb2..e7197f2 100644 --- a/gitinspector/gitinspector.py +++ b/gitinspector/gitinspector.py @@ -116,10 +116,10 @@ def __get_validated_git_repos__(repos_relative): #Try to clone the repos or return the same directory and bail out. for repo in repos_relative: cloned_repo = clone.create(repo) - basedir_path = basedir.get_basedir_git(cloned_repo.location) if cloned_repo.name == None: - cloned_repo.name = os.path.basename(basedir_path) + cloned_repo.location = basedir.get_basedir_git(cloned_repo.location) + cloned_repo.name = os.path.basename(cloned_repo.location) repos.append(cloned_repo)