Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c21931

Browse files
coderangerhvr
authored andcommitted
Add a check for empty repos.
1 parent f608b94 commit 2c21931

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tracext/git/git_fs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,9 @@ class GitChangeset(Changeset):
599599
} # TODO: U, X, B
600600

601601
def __init__(self, repos, sha):
602+
if sha is None:
603+
raise NoSuchChangeset(sha)
604+
602605
try:
603606
msg, props = repos.git.read_commit(sha)
604607
except PyGIT.GitErrorSha:

0 commit comments

Comments
 (0)