Support git_remote_create_with_opts #733
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/645-git-remote-create-with-opts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #645
nice, thanks for doing this!
could this be
for consistency with https://godoc.org/github.com/libgit2/git2go#BlameOptionsFlag ? bonus points if a docstring is added.
it's probably better to not have this be passed in through the
Options
object, since the pointer to the C repository can be obtained from withinCreateWithOptions
, which has a strong affinity to a pre-existinggit.Repository
and would be confusing (API-wise) that one would be able to callmyOneRepository.Remotes.CreateWithOptions(...)
and the resulting remote would be associated with a repository that is notmyOneRepository
.in order to support detached remotes, we could introduce
func NewDetachedRemote(url string, options *RemoteCreateOptions) (*Remote, error)
.for consistency with the
_with_
part of the C function.also, can there be a docstring for this function?
otherwise, the go runtime is completely free to free the repository under us while the Cgo call is being made.
otherwise
opts
is unused!could this follow the
populateXxxOptions
convention found in other files? e.g.4b2ac7c998/revert.go (L18)
In my opinion,
NewDetachedRemote
is not needed right now. That was my design mistake. (Due to a dead copy of the C interface).just a few more style requests and we're good!
for consistency with all the other
populateXxxOptions()
functions.having a nil
repository
is completely legal.for consistency with all other places
ecode
is used.thanks :D