diff options
author | Robert Speicher <robert@gitlab.com> | 2018-03-05 16:57:13 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-03-05 16:57:13 +0000 |
commit | b82325cbbf76723ff1234f04ca6042af4adf8396 (patch) | |
tree | c1c5d9f78eb39858cf17310afcc316c99c8ee088 /app | |
parent | 0fc80c54f0d3e1caae1338665a98db78fa5fd8d7 (diff) | |
parent | 2cc43aaaf3162db8c584df3bb9d1a42d92084fae (diff) | |
download | gitlab-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
Diffstat (limited to 'app')
-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) |