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

Define new setting: "git.statusArgs.untrackedFiles" #136698

Closed

Conversation

ajhyndman
Copy link

This PR fixes #128800

If anyone has suggestions for how I might opt into this behaviour without patching the built-in git extension, I'd love to hear that as well. Without this change, VS Code's git features are almost unusable in my team's large repository.

NOTE: With this change, when using --untracked-files=normal, the VS Code status panel will not render untracked folders. It's an interesting product question whether or how untracked folders might be communicated in this mode, but simply omitting untracked folders vastly improves my workflow now. I don't see any reason that this need be a blocking decision.

@ghost
Copy link

ghost commented Nov 8, 2021

CLA assistant check
All CLA requirements met.

@ajhyndman
Copy link
Author

ajhyndman commented Nov 8, 2021

This could also be an alternate approach to fixing #131020.

I think landing both changes would be ideal. I am more than happy to rebase this change for compatibility, if there's interest.

@ajhyndman ajhyndman force-pushed the git-status-args-untracked-files branch from 9685bc7 to dbdeec1 Compare March 29, 2022 21:27
@ajhyndman
Copy link
Author

I have rebased this for compatibility with the recently landed change, #131030.

@lszomoru
Copy link
Member

@ajhyndman, thank you very much for rebasing this pull request. I have looked at both pull requests in this area and I have decided to merge #131030 as that adds support for -uno and -uall. Is there a valid scenario in which we would like to support -unormal?

@lszomoru lszomoru added git GIT issues under-discussion Issue is under discussion for relevance, priority, approach labels Mar 30, 2022
@lszomoru lszomoru added this to the April 2022 milestone Mar 30, 2022
@ajhyndman
Copy link
Author

ajhyndman commented Mar 30, 2022

@lszomoru I work with an oversized monorepo in my day job. I frequently patch the vscode git extension to set the status arg to -unormal.

This is definitely still not an ideal workflow, but git status -unormal runs in about 1 second, compared to -uall which can take closer to 20 seconds. A 20 second delay on feedback makes the VS Code git extension mostly unusable. -uno lets me work again, but I have to worry about forgetting untracked files. With -unormal, VS Code can still let me know about most of the untracked files in my repository while keeping performance manageable.

image

@lszomoru
Copy link
Member

@ajhyndman, thank you very much for getting back to me on this. I think that your scenario is valid, my only concern is that we do not want to lift git command arguments into VS Code settings. We currently have a setting that control untracked changes (git.untrackedChanges) so I will take a closer look at the existing values and see if that setting could be extended in order to expose an option which would result in using the -unormal argument. Will keep you posted.

@ajhyndman
Copy link
Author

@lszomoru That makes perfect sense. I agree that this is an awkwardly low-level setting!

Do you think it would make any more sense to expose the option programmatically instead? I'd be happy to write myself a small plugin to get this functionality rather than have to manually patch the built-in git extension.

@lszomoru lszomoru modified the milestones: April 2022, May 2022 Apr 25, 2022
@lszomoru lszomoru modified the milestones: May 2022, Backlog May 30, 2022
@lszomoru lszomoru added the perf label Dec 7, 2022
@lszomoru
Copy link
Member

Closing this pull request in favour of #169253

@lszomoru lszomoru closed this Dec 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
@lszomoru lszomoru reopened this Feb 4, 2025
@lszomoru lszomoru closed this Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues perf under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow opting out of git status "-u" option.
2 participants