libgit2 / libgit2/libgit2sharp
Using CherryPick with CommitOnSuccess = false
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 3.5k
- Fork
- 925
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dall’API Repository.CherryPick e dalla gestione di CherryPickOptions; confronta il percorso con CommitOnSuccess=false con il comportamento di rebase abort/continue e con la chiamata a git_repository_state_cleanup descritta nel report. Riproduci lo snippet fornito con LibGit2Sharp 0.26.2; il lavoro è completato quando il repository non rimane più nello stato di cherry-pick oppure viene documentato il comportamento di reset supportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, git
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100