Skip to content

Commit f70dde0

Browse files
committed
Introduce latest_user_commits vs latest_commits
1 parent fafbf00 commit f70dde0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/git_autograder/branch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,13 @@ def user_commits(self) -> List[GitAutograderCommit]:
106106
return user_commits
107107

108108
@property
109-
def latest_commit(self) -> GitAutograderCommit:
109+
def latest_user_commit(self) -> GitAutograderCommit:
110110
return self.user_commits[-1]
111111

112+
@property
113+
def latest_commit(self) -> GitAutograderCommit:
114+
return self.commits[-1]
115+
112116
def has_non_empty_commits(self) -> bool:
113117
"""Returns if a given branch has any non-empty commits."""
114118
for commit in self.user_commits:

0 commit comments

Comments
 (0)