CheckoutCommand does not support revision expressions using ~ and ^ operators

Đang mở
#244 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, java
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
427
Fork
116
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-jgit/jgit

Tất cả issue của eclipse-jgit/jgit

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.