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

Use try for commit prev_commit_id detection

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