Keep a commit around if its sha is present

Closes gitaly#1054
This commit is contained in:
Ahmad Sherif 2018-03-02 21:04:32 +01:00
parent ddad22c4c4
commit 2cc43aaaf3
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ class Repository
# branches or tags, but we want to keep some of these commits around, for
# example if they have comments or CI builds.
def keep_around(sha)
return unless sha && commit_by(oid: sha)
return unless sha.present? && commit_by(oid: sha)
return if kept_around?(sha)