Implement ResetCommand.ResetType.MERGE

Ouverte
#315 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
32/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
git, java
Domaine
devtools

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Java
Étoiles
427
Forks
116
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de eclipse-jgit/jgit

Toutes les issues de eclipse-jgit/jgit

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.