Follow-up from "Refactor root sha access code"

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

  • Close this issue

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

  • @mhamda started a discussion: (+1 comment)

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 Sep 22, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading