CheckoutCommand does not support revision expressions using ~ and ^ operators

Offen
#244 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
git, java
Bereich
cli

Rechercherichtung

Start by locating CheckoutCommand and tracing how it resolves the supplied revision; compare that behavior with JGit’s handling of Git revision expressions. Add support for ~ and ^ expressions such as HEAD~1 and commit^2, then run the relevant checkout tests and verify switching to those revisions works.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

CheckoutCommand currently does not support Git revision expressions using the ~ and ^ operators (For example: HEAD~1, commit^1, commit^2 etc.)

C-git support these for checkout command. But, jgit is throwing InvalidRefException while executing checkout command with the above operators.

Motivation

Developer will be able to seamlessly switch to an older commit to debug certain issues in the code.

For example, if the develop wants to create a new branch from the parent of HEAD, he can execute git checkout HEAD~1 and git checkout -b <branch-name> sequentially

Alternatives considered

No response

Additional context

No response

Vorherrschende Sprache
Java
Sterne
427
Forks
116
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus eclipse-jgit/jgit

Alle Issues in eclipse-jgit/jgit

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.