File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,14 @@ function M.onto_pushRemote(popup)
3131end
3232
3333function M .onto_upstream (popup )
34- local upstream
35- if git .repo .state .upstream .ref then
36- upstream = string.format (" refs/remotes/%s" , git .repo .state .upstream .ref )
37- else
38- local target = FuzzyFinderBuffer .new (git .refs .list_remote_branches ()):open_async ()
39- if not target then
40- return
41- end
42-
43- upstream = string.format (" refs/remotes/%s" , target )
34+ local upstream = git .branch .upstream (git .branch .current ())
35+ if not upstream then
36+ upstream = FuzzyFinderBuffer .new (git .refs .list_branches ()):open_async ()
4437 end
4538
46- git .rebase .onto_branch (upstream , popup :get_arguments ())
39+ if upstream then
40+ git .rebase .onto_branch (upstream , popup :get_arguments ())
41+ end
4742end
4843
4944function M .onto_elsewhere (popup )
You can’t perform that action at this time.
0 commit comments