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

Stashing staged changes also stashes unstaged changes of the partially staged file #2539

Closed
ShafinKhadem opened this issue Mar 4, 2023 · 1 comment
Labels
bug Something isn't working verified ✔ Verified
Milestone

Comments

@ShafinKhadem
Copy link
Contributor

ShafinKhadem commented Mar 4, 2023

Description

How to reproduce

  1. In vscode-gitlens repo, make some changes in README.md and stage the changes.
  2. Make some more changes in README.md which are not staged.
  3. Click on the stash button beside 'staged changes' block.

Expected behavior

Only the staged changes of README.md should be stashed.

Actual behavior

The whole file README.md is stashed and we lose the information about how much of the file was staged.

GitLens Version

13.3.1

VS Code Version

Version: 1.76.0
Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb
Date: 2023-03-01T10:23:06.752Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.3.0
Sandboxed: No

Git Version

git version 2.37.1 (Apple Git-137.1)

Logs, Screenshots, Screen Captures, etc

Screencast

Kapture 2023-03-04 at 14 33 49

Logs

[2023-03-04 08:41:27.881] [  3c7] W(/Users/nafiur.khadem/repos/vscode-gitlens).stashSave(e=, t=[{"$mid":1,"fsPath":"/Users/nafiur.khadem/repos/vscode-gitlens/README.md","external":"file:///Users/nafiur.khadem/repos/vscode-gitlens/README.md","path":"/Users/nafiur.khadem/repos/vscode-gitlens/README.md","scheme":"file"}], i={"includeUntracked":false,"keepIndex":false})
[2023-03-04 08:41:27.881] [  3c8] GitProviderService.stashSave(e=/Users/nafiur.khadem/repos/vscode-gitlens, t=, i=1, n={"includeUntracked":false,"keepIndex":false})
[2023-03-04 08:41:27.881] [  3c9] LocalGitProvider.stashSave(e=/Users/nafiur.khadem/repos/vscode-gitlens, t=, i=1, n={"includeUntracked":false,"keepIndex":false})
[2023-03-04 08:41:27.979] [GIT  ] [/Users/nafiur.khadem/repos/vscode-gitlens] git stash push -u --pathspec-from-file=- --pathspec-file-nul • 97 ms
[2023-03-04 08:41:27.979] [  3ca] LocalGitProvider.resetCache(e=/Users/nafiur.khadem/repos/vscode-gitlens, ...t=stashes) completed • 0 ms
[2023-03-04 08:41:27.979] [  3cb] VslsGitProvider.resetCache(e=/Users/nafiur.khadem/repos/vscode-gitlens, ...t=stashes) completed • 0 ms
[2023-03-04 08:41:27.979] [  3cc] GitHubGitProvider.resetCache(t=/Users/nafiur.khadem/repos/vscode-gitlens, ...e=stashes) completed • 0 ms
[2023-03-04 08:41:27.979] [  3cd] W(/Users/nafiur.khadem/repos/vscode-gitlens).resetCaches(stashes) completed • 0 ms
[2023-03-04 08:41:27.979] [  3c9] LocalGitProvider.stashSave(e=/Users/nafiur.khadem/repos/vscode-gitlens, t=, i=1, n={"includeUntracked":false,"keepIndex":false}) completed • 98 ms
[2023-03-04 08:41:27.979] [  3c8] GitProviderService.stashSave(e=/Users/nafiur.khadem/repos/vscode-gitlens, t=, i=1, n={"includeUntracked":false,"keepIndex":false}) completed • 98 ms
[2023-03-04 08:41:27.979] [  3ce] W(/Users/nafiur.khadem/repos/vscode-gitlens).fireChange(4)
[2023-03-04 08:41:27.980] [  3ce] W(/Users/nafiur.khadem/repos/vscode-gitlens).fireChange(4) completed • 0 ms
[2023-03-04 08:41:27.980] [  3c7] W(/Users/nafiur.khadem/repos/vscode-gitlens).stashSave(e=, t=[{"$mid":1,"fsPath":"/Users/nafiur.khadem/repos/vscode-gitlens/README.md","external":"file:///Users/nafiur.khadem/repos/vscode-gitlens/README.md","path":"/Users/nafiur.khadem/repos/vscode-gitlens/README.md","scheme":"file"}], i={"includeUntracked":false,"keepIndex":false}) completed • 99 ms
[2023-03-04 08:41:27.980] [  3cf] KeyboardScope.dispose[1]
[2023-03-04 08:41:27.980] [  3bb] Vc.execute completed
[2023-03-04 08:41:27.986] [  3cf] KeyboardScope.dispose[1] completed • index=0 • 6 ms
@ShafinKhadem ShafinKhadem added potential-bug triage Needs to be looked at labels Mar 4, 2023
@d13 d13 added bug Something isn't working pending-release Resolved but not yet released to the stable edition verified ✔ Verified and removed potential-bug triage Needs to be looked at labels Mar 8, 2023
@d13 d13 closed this as completed Mar 9, 2023
@d13 d13 added this to the 13.3-patch milestone Mar 9, 2023
@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Mar 16, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working verified ✔ Verified
Projects
None yet
Development

No branches or pull requests

3 participants