Skip to content

Remove Gitlab::Shell#create_repository

Nick Thomas requested to merge 25095-remove-gitlab-shell-references into master

What does this MR do?

This MR removes Gitlab::Shell#create_repository, replacing it with calls to ::Gitlab::Git::Repository#create_repository instead. The two are equivalent; there's no need to indirect through Gitlab::Shell, and we only do it for historical reasons. Removing these calls simplifies the codebase and aids understanding.

The end goal is to remove all instance methods from Gitlab::Shell. In this MR, I also promote a couple of methods to class level (version and url_to_repo), and remove some dead code. Technically they could be separate MRs in their own right, but they're quite small changes, and I already split several other MRs out of here. I think what remains is small enough to be reviewed in a single piece.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

This is mostly just a refactoring, but ::Repository does have caching properties that ::Gitlab::Git::Repository lacks. I've looked, and think it's OK, but it's something to pay close attention to in review.

Part of #25095 (closed)

Edited by Nick Thomas

Merge request reports