Closed samcoe closed 1 year ago
@mislav Thanks for the feedback! You have raised some good points. It is possible that this work should be started in cli/cli
, I mostly started it here due to https://github.com/cli/cli/issues/5544 where we had targeted it for extraction. We can take it off that list though if you don't think it is valuable to have in go-gh
though.
Offline, we have decided now is not the right time to introduce this feature into go-gh
but rather start with an implementation in cli/cli
and see how that goes and when we feel more confident in this direction we will extract it.
This PR exports the
git
package that had been internal for some time, no behavior changes here. It also adds in a newgit
client type that will be used for interacting with a localgit
repository. It is heavily inspired by this work done by@mislav
. Right now the only exported methods on thegit
client areCommand
which is the base method, similar toDo
forhttp.Client
, that all other methods will use to execute commands andRemotes
which lists remotes for the local repo. The reason I addedRemotes
is because it is needed withingo-gh
. I think for the initial version these are the only two that will be supported but more will be added in the future as necessary.TODO: