You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(git): find upstream remote when using ssh (#926)
* feat: find upstream remote when using ssh
The `upstream_remote` function was relying on `url::Url::parse` to extract the `owner` and `repo` from the `url`. But that only works when the repo is cloned using a URL, e.g. `https://github.com/orhun/git-cliff.git`. However, this would fail to parse when cloned using SSH, e.g. `[email protected]:orhun/git-cliff.git`.
If the url::URL::parser fails, we now try to parse an SSH remote in the format `git@hostname:owner/repo.git`.
The error from `upstream_remote` also notes that a posible reason for it failing would be that the `HEAD` is detached.
* Update git-cliff-core/src/repo.rs
* Update git-cliff-core/src/repo.rs
---------
Co-authored-by: Orhun Parmaksız <[email protected]>
0 commit comments