Skip to content

Clean up the repository class by moving user interactions into a new class

While working on !926 (merged) I got a failure indicating the Repository class is to big.

To slim it down a bit, I've removed some dead code.

I've also moved all user interactions with the repository into a UserRepository class. The goal is to keep the Repository contained to "clean" interactions with the git repository, while UserRepository would contain the operations that a user wants to perform on that repository. The latter then uses the OperationService to perform those operations and calling the required hooks.

The following methods have been moved:

- add_branch
- add_tag
- rm_tag
- merge
- ff_merge
- revert
- cherry_pick (got rid of the intermediate `rugged_cherry_pick` as I
  don't think there was an alternative)
- rebase
- squash
- multi_action
- user_to_committer
- commit_index
- git_env_for_user

Merge request reports