1
0
mirror of https://github.com/danog/gift.git synced 2024-11-26 20:04:47 +01:00

Merge pull request #98 from PeterDaveHello/valid-commit-id

This commit is contained in:
Luke Plaster 2017-11-06 20:09:02 +08:00 committed by GitHub
commit c484d36dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ module.exports = class Commit
lines = text.split "\n"
while lines.length
id = _.last lines.shift().split(" ")
break if !id
break if !/^[a-f0-9]{40}$/.test(id)
tree = _.last lines.shift().split(" ")
parents = []