提交 18454292 编写于 作者: D Dmitriy Zaporozhets

Use try for commit prev_commit_id detection

上级 45b18365
...@@ -120,10 +120,10 @@ class Commit ...@@ -120,10 +120,10 @@ class Commit
end end
def prev_commit def prev_commit
parents.first parents.try :first
end end
def prev_commit_id def prev_commit_id
prev_commit.id prev_commit.try :id
end end
end end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册