diff --git a/gitinspector/changes.py b/gitinspector/changes.py index bc8ef39..1dedccc 100644 --- a/gitinspector/changes.py +++ b/gitinspector/changes.py @@ -208,8 +208,8 @@ class Changes: self.commits = [item for sublist in self.commits for item in sublist] - if interval.has_interval() and len(commits) > 0: - interval.set_ref(commits[-1].sha) + if interval.has_interval() and len(self.commits) > 0: + interval.set_ref(self.commits[-1].sha) if len(self.commits) > 0: self.first_commit_date = datetime.date(int(self.commits[0].date[0:4]), int(self.commits[0].date[5:7]),