dynamist / subgit

Sub-git repo handler
Apache License 2.0
0 stars 0 forks source link

Refactor Core into Core + SgitRepo for simpler logic implementation per repo and reuseability of features and functions in different commands #24

Open Grokzen opened 2 years ago

Grokzen commented 2 years ago

Right now everything is pretty much jumbled up into one place and we do all repo tracking and parsing within the Core class.

What i want to change is that we should split the logic into two classes where we make a Wrapper class around git-pythoons Repo class with our own SgitRepo class where we put most of the logic that we add that deals with the repo itself.

Then we keep most of the cli buisiness logic within the Core class as today, but we try to push down as much code as possible into SgitRepo to reduce the complexity of things.

Note here that we also want to avoid recoding same things all over that many commands already do like resetting, tracking config, custom state handling, checking if repo is dirty and so on. This belongs within SgitRepo as many different commands will want to re-use these things.