Skip to content
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

Using CherryPick with CommitOnSuccess = false #1774

Open
PDarkTemplar opened this issue Mar 11, 2020 · 0 comments
Open

Using CherryPick with CommitOnSuccess = false #1774

PDarkTemplar opened this issue Mar 11, 2020 · 0 comments

Comments

@PDarkTemplar
Copy link

PDarkTemplar commented Mar 11, 2020

Reproduction steps

using (var repo = new Repository("path\to\repo"))
            {
                var commit1 = repo.Lookup<Commit>("a05b011d89bbd5c9117840b71718ce2a1ee00376");

                var masterTb = repo.Branches["refs/remotes/origin/release/1.0"];
                var master = repo.CreateBranch("release/1.0", masterTb.Tip);

                var updateMb = repo.Branches.Update(master,
                  b => b.TrackedBranch = masterTb.CanonicalName);

                Commands.Checkout(repo, updateMb);

                var result = repo.CherryPick(commit1, commit1.Author, new CherryPickOptions { CommitOnSuccess = false});
}

If i use CherryPick with CommitOnSuccess = false repo is left in cherry-pick state. For rebase there is abort and continue commands, but for cherry pick there is non.

I checked up code and if i use CommitOnSuccess = true there is git_repository_state_cleanup which clean up chery-pick state.

Is this a bug or there is some commands to reset state?

Expected behavior

cherry picked and exit cherry-pick state

Actual behavior

left in cherry-pick state

Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

Windows 10 Version 2004 10.0.19041
.Net Core 3.1

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

No branches or pull requests

1 participant