Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling changes to another branch connected to a worktree creates opposite changes as staged #3216

Open
Nagell opened this issue Apr 5, 2024 · 0 comments
Labels
bug Something isn't working triage Needs to be looked at

Comments

@Nagell
Copy link

Nagell commented Apr 5, 2024

Description

Every time I'm in some branch connected to a worktree and want to pull changes into another one which is also connected to some worktree the following happens:

  • changes are being pulled
  • exactly opposite changes to what was just being pulled are added to the Staged changes

Next time, if I want to do it again, I'm forced to open the worktree with such Staged changes and remove them. Otherwise I won't be able to pull again, because of "Uncommitted changes".

In a scenario in which I'm pulling regularly another branch and merging it into my current one, it is very annoying to be forced to open another window (with the second worktree) and pull changes there to avoid this disturbance.

Steps to reproduce

  1. Open one of the worktrees
  2. Pull changes in some other branch connected with a second worktree via Pull button in the Branches panel
  3. Open the second worktree in an editor
  4. Go to a Source Control panel
  5. See exactly opposite changes in Staged changes to what was just pulled (like it would be ready to revert the last changes)

Expected

All changes should just be pulled and Staged changes should be clear like it is for a branch not connected to a worktree.

GitLens Version

14.9.0

VS Code Version

Version: 1.88.0 (user setup)
Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
Date: 2024-04-03T13:26:18.741Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

Git Version

git version 2.40.0.windows.1

Logs, Screenshots, Screen Captures, etc

The log was to long - it was moved here: https://pastebin.com/J8kf7rBm

@Nagell Nagell added bug Something isn't working triage Needs to be looked at labels Apr 5, 2024
@Nagell Nagell changed the title Pulling changes to another branch connected to a worktree copies all files and adds them to staged Pulling changes to another branch connected to a worktree creates opposite changes as staged Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs to be looked at
Projects
None yet
Development

No branches or pull requests

1 participant