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 - fix stage/unstage selected ranges in nested git repositories #191987

Merged
merged 3 commits into from
Sep 6, 2023

Conversation

lszomoru
Copy link
Member

@lszomoru lszomoru commented Sep 1, 2023

Related #188967

When opening a folder/workspace that contains nested git repositories some operations (ex: stage/unstage selected ranges) do not work as expected. I have tracked this down to the fact that the QuickDiffService will return both repositories instead of only the inner repository. Due to that, the diff information provided to the stage/unstage selected ranges commands is incorrect.

The issue could be fixed either in the git extension or in the QuickDiffService. The changes in this pull request fixes the issue in the git extension but I would like to get your thoughs on whether this should be fixed in the git extension or the QuickDiffService. Thanks!

@lszomoru lszomoru added the git GIT issues label Sep 1, 2023
@lszomoru lszomoru self-assigned this Sep 1, 2023
@lszomoru lszomoru enabled auto-merge (squash) September 1, 2023 12:55
@lszomoru lszomoru added this to the September 2023 milestone Sep 1, 2023
extensions/git/src/repository.ts Outdated Show resolved Hide resolved
extensions/git/src/repository.ts Outdated Show resolved Hide resolved
@joaomoreno
Copy link
Member

I think the fix makes more sense to happen in the git extension, this is the best approach. 👌

@lszomoru lszomoru removed the request for review from alexr00 September 6, 2023 07:37
@lszomoru lszomoru merged commit a4e1870 into main Sep 6, 2023
6 checks passed
@lszomoru lszomoru deleted the lszomoru/fierce-tick branch September 6, 2023 12:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants