Implement ResetCommand.ResetType.MERGE

Aberta
#315 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
32/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
git, java
Domínio
devtools

Direção de pesquisa

Start from the MERGE stub in org.eclipse.jgit.api.ResetCommand.ResetType and the ResetCommand class that handles the other reset types. Read the git reset documentation quoted in the issue, which defines the behaviour: update the working tree only for files that differ between the target commit and HEAD, keep unstaged changes, and abort when such a file has unstaged changes. Done means the mode matches git reset --merge for unmerged index entries, with tests covering the abort case.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Description

JGit currently lacks support for git reset --merge (stubs for this have already been added in org.eclipse.jgit.api.ResetCommand.ResetType, but were never implemented).

Motivation

The purpose of this reset mode is to recover cleanly from merge conflicts and is a prerequisite for supporting multi-commit git cherry-pick --continue/--skip/--abort in JGit (work for this was already started in https://github.com/eclipse-jgit/jgit/issues/301 which adds the support for writing the sequencer state for CherryPickCommand/RevertCommand)

Additional context

The git documentation describes this merge mode as follows:

Reset the index and update the files in the working tree that are different between <commit> and HEAD, but keep those which are different between the index and working tree (i.e. which have changes which have not been added). Mainly exists to reset unmerged index entries, like those left behind by git am -3 or git switch -m in certain situations. If a file that is different between <commit> and the index has unstaged changes, reset is aborted.

Linguagem predominante
Java
Estrelas
427
Forks
116
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de eclipse-jgit/jgit

Todas as issues de eclipse-jgit/jgit

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.