Don't pass HEAD to the MethodDefectPredictor tester script, but an actual hash

pydriller has a bug when using HEAD (https://github.com/ishepard/pydriller/issues/90)
This commit is contained in:
Marco Castelluccio 2020-02-27 12:28:07 +01:00
Родитель c227806c04
Коммит c59d40863b
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -710,6 +710,15 @@ class CommitClassifier(object):
stop_hash = p.stdout.decode().strip()
p = subprocess.run(
["git", "rev-list", "-n", "1", "HEAD",],
check=True,
capture_output=True,
cwd=self.git_repo_dir,
)
start_hash = p.stdout.decode().strip()
# Run the method-level analyzer.
subprocess.run(
[
@ -718,7 +727,7 @@ class CommitClassifier(object):
"--repo",
self.git_repo_dir,
"--start",
"HEAD",
start_hash,
"--stop",
stop_hash,
"--output",