rugged icon indicating copy to clipboard operation
rugged copied to clipboard

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

Open fauno opened this issue 2 years ago • 2 comments

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 avatar Sep 12 '23 15:09 fauno

I'm using Alpine (musl) with included libgit2

fauno avatar Sep 12 '23 15:09 fauno

Seems to have been removed here:

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

fauno avatar Sep 12 '23 16:09 fauno