[go: up one dir, main page]

Skip to content

Follow-up from "Refactor root sha access code"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !112289 (merged) should be addressed:

Problem

Method #root_ref_sha is used in multiple places, but it is not safe to use. For example, it can raise an exception if repository is empty.

Proposal

  1. Verify commit existence and return nil instead of an exception.
  2. Test and update, if necessary, all cases where the method is used. (if the code relies on the exception, then update it to handle nil value)
Edited by 🤖 GitLab Bot 🤖