Find if a branch is merged into another branch.

Aperta
#1,150 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

La issue riguarda repository.find_branch(..., BranchType::Local) e br.delete(); confronta innanzitutto queste API con la issue collegata di libgit2/libgit2sharp e esamina le API dei branch del binding Rust. Il lavoro è completato quando viene documentato o esposto il modo supportato da Rust per determinare se un branch locale è completamente sottoposto a merge, incluso il comportamento previsto prima dell'eliminazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm attempting, given a list of local branches (repository.branches(Some(BranchType::Local))), to find out which ones have been merged; basically to know if git branch -d "branch name" would give an error telling you the branch isn't fully merged (and that you must use -D if you want to delete anyway).

(this is "pseudo-code" simplified for this issue, so I'm omitting the match clauses, and whatnot)

I'm calling let br = repository.find_branch(&branch_name, BranchType::Local) and then I'm calling let result = br.delete().

This seems like it doesn't care if the branch is merged or not (perhaps I have this all wrong so I once again ask for forgiveness if what I'm trying to do is the "wrong way").

I've come across this: https://github.com/libgit2/libgit2sharp/issues/1433

But this is C#, and I cannot find what the equivalent would be in the rust bindings (my Rust knowledge is also quite limited).

Apologies for creating an Issue, I wasn't sure where to post this.

Thanks in advance.

Lingua principale
Rust
Stelle
2.1k
Fork
470
Merge medio
2g 17h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-lang/git2-rs

Tutte le issue di rust-lang/git2-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.