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)
31
31
end
32
32
33
33
function 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 ()
44
37
end
45
38
46
- git .rebase .onto_branch (upstream , popup :get_arguments ())
39
+ if upstream then
40
+ git .rebase .onto_branch (upstream , popup :get_arguments ())
41
+ end
47
42
end
48
43
49
44
function M .onto_elsewhere (popup )
You can’t perform that action at this time.
0 commit comments