summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-03-05 16:57:13 +0000
committerRobert Speicher <robert@gitlab.com>2018-03-05 16:57:13 +0000
commitb82325cbbf76723ff1234f04ca6042af4adf8396 (patch)
treec1c5d9f78eb39858cf17310afcc316c99c8ee088
parent0fc80c54f0d3e1caae1338665a98db78fa5fd8d7 (diff)
parent2cc43aaaf3162db8c584df3bb9d1a42d92084fae (diff)
downloadgitlab-ce-b82325cbbf76723ff1234f04ca6042af4adf8396.tar.gz
Merge branch 'fix/find-commit-with-empty-rev' into 'master'
Keep note commit around if commit_id is present Closes gitaly#1054 See merge request gitlab-org/gitlab-ce!17496
-rw-r--r--app/models/repository.rb2
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)