The Wayback Machine - http://web.archive.org/web/20200917083929/https://github.com/microsoft/vscode/issues/104945
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

Git: Stage selected ranges on unsaved file stages everything #104945

Open
alexanderkjeldaas opened this issue Aug 18, 2020 · 1 comment · May be fixed by #106079
Open

Git: Stage selected ranges on unsaved file stages everything #104945

alexanderkjeldaas opened this issue Aug 18, 2020 · 1 comment · May be fixed by #106079

Comments

@alexanderkjeldaas
Copy link

@alexanderkjeldaas alexanderkjeldaas commented Aug 18, 2020

  • VSCode Version: 1.48.0
  • OS Version: OS X

Steps to Reproduce:

  1. Do multiple changes in a file without saving the file.
  2. Select one of the changes for inclusion in the next commit "Stage Selected Ranges"
  3. Try committing.

Skärmavbild 2020-08-18 kl  20 22 14

Select "Save All & Commit".

Now you will see that all changes in the file was included in the commit.

What happens is "Save All & Commit All". What I want is either that the dialog box is updated to indicate what is happening, or that the selected range is the only part that is committed.

Does this issue occur when all extensions are disabled?: Yes/No

@joaomoreno joaomoreno changed the title Wrong/confusing dialog when committing unsaved file sections in git. Git: Stage selected ranges on unsaved file stages everything Sep 1, 2020
@anish-94
Copy link

@anish-94 anish-94 commented Sep 1, 2020

Looking at this bug. Would swapping the order of await Promise.all(documents.map(d => d.save())); and await repository.add(documents.map(d => d.uri)); help address this?

if (pick === saveAndCommit) {
await Promise.all(documents.map(d => d.save()));
await repository.add(documents.map(d => d.uri));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.