gitserver: Make Cmd fields private
Created by: ryanslade
This is in preparation for having two Command implementations, one that calls
out to gitserver over the network and one that runs against a local git
directory. This will allow us to more easily test inside the gitserver package
and should remove the need to run gitserver instances in tests. It may also
allow us to remove a lot of the mocking code we use today.
All fields inside of gitserver.Cmd
were made private. Methods were introduced
where we need to read or write the values outside of the package.
In the case of the Repo
field, we added it to the constructor as in all
places it was used previously we create a Cmd
and then set the value of the
Repo
field on the next line so this could be collapsed.
Test plan
Code only moved around. All tests still pass