Add branches to push subcommand by SandrineP · Pull Request #126 · QuantStack/git2cpp · GitHub
Skip to content

Add branches to push subcommand#126

Merged
JohanMabille merged 4 commits into
QuantStack:mainfrom
SandrineP:push_branch
Apr 17, 2026
Merged

Add branches to push subcommand#126
JohanMabille merged 4 commits into
QuantStack:mainfrom
SandrineP:push_branch

Conversation

@SandrineP

@SandrineP SandrineP commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator

Fix #98
Add <branch> and --branches flag to push subcommand.

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

@SandrineP SandrineP force-pushed the push_branch branch 2 times, most recently from c20f637 to 07a6ea8 Compare April 7, 2026 14:16
@SandrineP SandrineP marked this pull request as ready for review April 7, 2026 15:25
@SandrineP SandrineP marked this pull request as draft April 13, 2026 13:08
@SandrineP SandrineP marked this pull request as ready for review April 17, 2026 11:25
Comment thread src/subcommand/push_subcommand.cpp Outdated
{
const std::string name = br.first;
const git_oid& oid = br.second;
if (remotes_before_push.find(name) == remotes_before_push.end())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (remotes_before_push.find(name) == remotes_before_push.end())
if (!remotes_before_push.contains(name))

Comment thread src/subcommand/push_subcommand.cpp Outdated

for (const auto refspec : refspecs)
{
if (new_branches.find(refspec) == new_branches.end())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@JohanMabille JohanMabille merged commit 22db9ed into QuantStack:main Apr 17, 2026
4 of 7 checks passed
@SandrineP SandrineP deleted the push_branch branch April 17, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for git push <remote name> <branch name>

2 participants