libgit2 / rugged

ruby bindings to libgit2
MIT License
2.25k stars 277 forks source link

Rugged::Repository#clone_at :upstream option has no effect #970

Open fauno opened 1 year ago

fauno commented 1 year ago

According to docs

:remote The name to give to the “origin” remote. Defaults to "origin".

But doesn't produce any results. I've tested this with rugged 1.4.4, 1.5.3, 1.6.3 and 1.7.1:

require 'rugged'
Rugged::Repository.clone_at('../repo', 'fork', remote: 'upstream')
git -C fork remote -v
origin ../repo (fetch)
origin ../repo (push)

Shouldn't "origin" be named "upstream"? I would expect it to work like git clone --origin upstream ../repo fork

fauno commented 1 year ago

I'm using Alpine (musl) with included libgit2

fauno commented 1 year ago

Seems to have been removed here:

https://github.com/libgit2/libgit2/commit/1697cd6ff5d29c95106ff4b7bd56ebba5d51b8c1