File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,6 @@ void push_subcommand::run()
4141 std::string remote_name = m_remote_name.empty () ? " origin" : m_remote_name;
4242 auto remote = repo.find_remote (remote_name);
4343
44- push_update_payload push_payload;
45- push_payload.url = remote.url ();
46-
4744 git_push_options push_opts = GIT_PUSH_OPTIONS_INIT;
4845 push_opts.callbacks .credentials = user_credentials;
4946 push_opts.callbacks .push_transfer_progress = push_transfer_progress;
@@ -55,7 +52,7 @@ void push_subcommand::run()
5552 auto br = iter.next ();
5653 while (br)
5754 {
58- std::string refspec = " refs/head /" + std::string (br->name ());
55+ std::string refspec = " refs/heads /" + std::string (br->name ());
5956 m_refspecs.push_back (refspec);
6057 br = iter.next ();
6158 }
@@ -73,15 +70,15 @@ void push_subcommand::run()
7370 {
7471 auto head_ref = repo.head ();
7572 branch = head_ref.short_name ();
76- std::string refspec = " refs/heads/" + branch;
77- m_refspecs.push_back (refspec);
7873 }
7974 catch (...)
8075 {
8176 std::cerr << " Could not determine current branch to push." << std::endl;
8277 return ;
8378 }
8479 }
80+ std::string refspec = " refs/heads/" + branch;
81+ m_refspecs.push_back (refspec);
8582 }
8683 git_strarray_wrapper refspecs_wrapper (m_refspecs);
8784 git_strarray* refspecs_ptr = nullptr ;
You can’t perform that action at this time.
0 commit comments