Add sequencer support for multi-commit cherry-picking / revert
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 50/100
Direção de pesquisa
Start in org.eclipse.jgit.api.CherryPickCommand and RevertCommand, at the point where CHERRY_PICK_HEAD/REVERT_HEAD is written when a multi-commit sequence is interrupted by a conflict. Study the sequencer/{todo,head,opts,abort-safety} semantics listed in the issue and locate where in the repository/RefDirectory layer such state files should be persisted. Done means a multi-commit cherry-pick or revert interrupted mid-sequence leaves a valid, git-compatible sequencer state (unsupported opts in sequencer/opts throw), single-commit operations still write only CHERRY_PICK_HEAD/REVERT_HEAD, and new tests alongside the existing cherry-pick/revert command tests cover this.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
JGit's CherryPickCommand and RevertCommand currently only track a single in-progress operation via CHERRY_PICK_HEAD/REVERT_HEAD. When multiple commits are included in one call and a conflict interrupts the sequence partway through, JGit has no way to record which commits are still pending, so the operation can't be resumed, skipped, or aborted compatibly with native Git's git cherry-pick --continue/--skip/--abort (or vice versa).
Motivation
Native Git tracks multi-commit cherry-pick/revert sequences in $GIT_DIR/sequencer/{todo,head,opts,abort-safety}.
These files have the following semantics / include the following information:
head— the original HEAD before the sequence started.todo— the remainingpick/revert <abbrev-sha> <subject>lines, rewritten before each commit is applied.opts— the replay options used duringpick/revert, stored in git-config formatabort-safety— the HEAD commit expected after each step, updated after every successful pick/revert.
JGit's CherryPickCommand and RevertCommand currently only support the strategy, no-commit and mainline options, so only these options would need to be persisted in sequencer/opts for now. If future support for --continue/--skip/--abort is added to JGit, encountering options not yet handled by JGit must be considered and handled appropriately (e.g. by throwing an exception).
If a cherry-pick/revert involves more than one commit, JGit must write/maintain the sequencer state throughout the pick/revert sequence. Single-commit operations do not write sequencer states and continues to only write CHERRY_PICK_HEAD/REVERT_HEAD.
Additional context
Persisting the sequencer state enables future JGit / EGit --continue/--skip/--abort support for multi-commit cherry-picks / reverts. This again is a pre-requisite for implementing multi-commit cherry-picks via the EGit UI (work started and currently blocked in https://github.com/eclipse-egit/egit/issues/192).
- Linguagem predominante
- Java
- Estrelas
- 427
- Forks
- 116
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de eclipse-jgit/jgit
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
eclipse-jgit/jgit#329 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Talvez livre de novo @hardikyadav12 assumiu há 77 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
eclipse-jgit/jgit#297 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
eclipse-jgit/jgit#293 · 2 comentários ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
eclipse-jgit/jgit#288 ·
Todas as issues de eclipse-jgit/jgit
Issues semelhantes
-
? - Needs Triage bot_watch bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/cudf-spark-jni#5594 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Upgrade solr to 9.11.0Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
DataONEorg/dataone-indexer#390 ·