beyondcode / beyondcode/polyscope-community

[Bug]: Remote branch selection uses an unresolved local branch name when creating a workspace

Đang mở Phù hợp với người mới
#199 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
20
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Platform

Windows

### Operating system version

11

### System architecture

Windows

### PolyScope Version

0.26

### Bug description

Creating a workspace from a non-default branch fails even when I select that branch from the Remote branches section.

Polyscope appears to discard the remote qualification and passes the branch’s short name to git checkout -B. The new clone only contains the branch as a remote-tracking ref, so Git cannot resolve the supplied start-point.

Inspection of the failed clone shows:

```
refs/heads/master
refs/remotes/origin/master-updated-stu
```

The remote-tracking ref resolves successfully:

`git rev-parse --verify "origin/master-updated-stu^{commit}"`

But the short local name does not:

`git rev-parse --verify "master-updated-stu^{commit}"`
fatal: Needed a single revision

### Steps to reproduce

1. Open a repository whose default/current branch is master.
2. Ensure another branch, such as master-updated-stu, exists on origin.
3. Start creating a new workspace "from branch"
4. Search for or select relevant branch name.
5. Select the entry marked Remote.
6. Create the workspace.

### Relevant log output

```shell
Command failed: git checkout -B "brave-moth" "master-updated-stu"
fatal: 'master-updated-stu' is not a commit and a branch 'brave-moth' cannot be created from it
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start at the workspace creation flow that handles the selected Remote branch and trace the value passed to the git checkout -B command. Reproduce with a remote-only branch such as master-updated-stu, then verify that workspace creation succeeds using the remote-tracking reference and that the resulting workspace is based on the selected commit.

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

Đánh giá

Công nghệ
git
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

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.