-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat(remotes): use inputlist
on multiple git remotes
#267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #267 +/- ##
==========================================
+ Coverage 70.82% 71.48% +0.66%
==========================================
Files 10 10
Lines 963 982 +19
==========================================
+ Hits 682 702 +20
+ Misses 281 280 -1 ☔ View full report in Codecov by Sentry. |
After some testing, I found the current code base cannot work with The whole workflow is running inside the async/coroutine framwork, so I also have to wrap the But the issue is the But on another hand, the |
vim.ui.select
on multiple git remotesinputlist
on multiple git remotes
lua/gitlinker/git.lua
Outdated
@@ -372,6 +424,10 @@ local function get_branch_remote(cwd) | |||
return remotes[1] | |||
end | |||
|
|||
if #remotes > 1 then | |||
return _select_remotes(remotes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @tvsfx , wonder if you are interested in reviewing this PR?
It allows user to select the remotes (only when) there're multiple git remotes and user doesn't provide the remote
parameter. Then this plugin will popup a dialog to allow user to select a remote, instead of throwing an error message.
I had done some manual testings on my local machine to make sure it is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, guess I'm too late to review this by now... (I'd have to read up some more on coroutines in Lua to be able to say anything substantial about it regardless) Anyway, I like this idea! I still prefer using the upstream of the current branch if it is available, but I think I'll use this for cases where no upstream is available and multiple remotes are configured (e.g. when checking out tags or raw commits).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedbacks are welcome!
Close #266 .
Test Platforms
Test Hosts
Test Functions
GitLink(!)
to copy git link (or open in browser).GitLink(!) blame
to copy the/blame
link (or open in browser).GitLink(!) default_branch
to open the/main
//master
link in browser (or open in browser).GitLink(!) current_branch
to open the current branch link in browser (or open in browser).