Allow shas that are nil to compare to nil shas
What does this MR do?
This fixes equality of SHA1 hashes. Previously, shas_eql?(nil, nil)
would return false, which breaks equality semantics for DiffRefs
.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
Git hashes are ubiquitous throughout GitLab - while it appears that this current behaviour is a bug (one that seldom appears since we seldom have nillable hashes), it is possible that this could break existing code. We need to be prepared to revert this if there are issues.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Found during work on #13495 (closed)