diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-03-02 21:04:32 +0100 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-03-05 17:14:30 +0100 |
commit | 2cc43aaaf3162db8c584df3bb9d1a42d92084fae (patch) | |
tree | b4977e107e95e4f976e885090a6bebe7fe4b5661 /app/models | |
parent | ddad22c4c4fde6dbec4a9224a3c2500af8bc7bf0 (diff) | |
download | gitlab-ce-2cc43aaaf3162db8c584df3bb9d1a42d92084fae.tar.gz |
Keep a commit around if its sha is present
Closes gitaly#1054
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |