From 2cc43aaaf3162db8c584df3bb9d1a42d92084fae Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Fri, 2 Mar 2018 21:04:32 +0100 Subject: Keep a commit around if its sha is present Closes gitaly#1054 --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 242d9d5f125..1a14afb951a 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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) -- cgit v1.2.1