tea pulls checkout does not properly work on Windows #414

Open
opened 2021-09-26 13:25:19 +00:00 by justusbunsi · 1 comment
Member

Scenario: (as title using Windows)

  • clone https://gitea.com/gitea/tea
  • run tea pulls checkout 411 or tea pulls checkout -b 411
    Passing -b flag doesn't change the behavior.

Using Linux this works as intended. On Windows tea kind of checked out the branch state but gives the following output resulting in a non-clean worktree.

Fetching PR 411 (head https://gitea.com/noerw/tea:add-repo-clone) from remote 'pulls/noerw'
already up-to-date
Checking out remote tracking branch refs/remotes/pulls/noerw/add-repo-clone. To make changes, create a new branch:
  git checkout add-repo-clone
Error: worktree contains unstaged changes

Running git status afterwards gives the following result:

On branch pulls/411
Your branch is up to date with 'pulls/noerw/add-repo-clone'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   cmd/repos.go
        deleted:    cmd/repos/clone.go
        modified:   modules/git/repo.go

It's like the actual changes from the PR were partially reset.

Scenario: (as title using Windows) - clone https://gitea.com/gitea/tea - run `tea pulls checkout 411` or `tea pulls checkout -b 411` Passing `-b` flag doesn't change the behavior. Using Linux this works as intended. On Windows `tea` kind of checked out the branch state but gives the following output resulting in a non-clean worktree. ``` Fetching PR 411 (head https://gitea.com/noerw/tea:add-repo-clone) from remote 'pulls/noerw' already up-to-date Checking out remote tracking branch refs/remotes/pulls/noerw/add-repo-clone. To make changes, create a new branch: git checkout add-repo-clone Error: worktree contains unstaged changes ``` Running `git status` afterwards gives the following result: ``` On branch pulls/411 Your branch is up to date with 'pulls/noerw/add-repo-clone'. Changes to be committed: (use "git restore --staged <file>..." to unstage) modified: cmd/repos.go deleted: cmd/repos/clone.go modified: modules/git/repo.go ``` It's like the actual changes from the PR were partially reset.
Author
Member

It might be an issue with the go-git library. At least I found an open issue mentioning that error message. Any ideas?

It might be an issue with the go-git library. At least I found an [open issue](https://github.com/go-git/go-git/issues/182) mentioning that error message. Any ideas?
noerw added the
kind/bug
label 2021-09-26 14:20:49 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#414
No description provided.