Unfortunately, with anything `git2`, it's impossible (or unknown) to
prevent it from picking up the users configuration, hence tests aren't
isolated.
This change alleviates the worst results of this which at least makes
the tests run in my particular setup.
The worktree diff is essentially a 'git status' with a given tree,
and that can be expressed with a diff of the workdir, the index and a tree.
This comes at the expense of not being able to control which file sizes are diffed.
This is in preparation for making operations that access the filesystems
less stateful, which in turn makes it less akward to identify writing
methods with `&mut` lateron.
This includes accepting that all we really need is a single directory
to generate everything else we need on the fly. This simplifies commands.
For good measure, this also simplifies imports of smaller crates that are
involved.
Further to the move - the VirtualBranchesExt trait creates a dependency towards gitbutler-project. The gitubler-branch crate doesn't have such dependency so i deemed it undesirable to introduce it just for a convinience method.
(Separately added an extention in gitbutler-virtual-actions since it already depends on project and to create a smaller diff)
This is more descriptive to what logic lives inside. Further, this allows for splitting up the just branch bits in a separate crate (which is currently in gitbutler-core)
This type currently acts more or less like a command context that lives for the duration of the request. Regardless of if we wanna keep this pattern or not, separating it out helps us split up core
This will also remove them from their plain-text location.
Further, when the secrets are required they will be obtained
specifically, instead of always having them at hand.
The frontend doesn't ever show these, but needs them, and
it now asks for them when it needs them.