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

Add setting to automatically close Working Tree tabs when window is closed or when commit has been made #141475

Closed
Coteh opened this issue Jan 25, 2022 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues on-testplan
Milestone

Comments

@Coteh
Copy link

Coteh commented Jan 25, 2022

Although I use git command line for most things, I use the IDE when making commits, and I find that whenever I make a commit, close a project and reopen it at a later point, there are still a whole bunch of Working Tree tabs from before that I do not need to see anymore. I often have a tab for the file itself anyway, so when I reopen the IDE, I basically have two tabs for each file, one of them is the file itself and the other is the diff tab.

It would be nice if there was some sort of config option available to automatically close all these types of tabs whenever a commit has been made and/or when the window is closed. Would keep the IDE a bit tidier for me.

edit: openDiffOnClick does not work for me because I still like to see these diffs.

@lszomoru lszomoru added feature-request Request for new features or functionality git GIT issues labels Jan 25, 2022
@omidantilong
Copy link

There are already 47 upvotes on one of the old threads for this - are those counted when deciding if something gets moved to the backlog or do people need to vote on this specific issue?

@lszomoru
Copy link
Member

lszomoru commented Feb 4, 2022

Yes, this is something that I will be looking at this milestone.

@lszomoru
Copy link
Member

Today's Insiders release (2022-02-10) contains a new setting (git.closeDiffOnOperation) that is meant to address the need to manually close the diff editors after certain git operations. If the setting is enabled, diff editors will automatically be closed when changes are committed, discarded, staged, unstaged. Try out the new setting and let me know your feedback.

@omidantilong
Copy link

I just gave it a go and it seems to work well so far. Initially it felt a bit eager, I thought it would close on commit, not when the file is staged. But I'll try to use it for some "real" work and see how it behaves.

I do still think a manual "Close all tabs with (Working Tree) in the name" action in the command palette would be useful.

Thanks for the updates!

@lszomoru
Copy link
Member

Today's Insiders release (2022-02-16) contains a new command Git: Close All Diff Editors to manually close the diff editors independent of the git.closeDiffOnOperation setting. Please give it a try and let me know if you experience any issues with the command.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues on-testplan
Projects
None yet
Development

No branches or pull requests

5 participants
@bpasero @omidantilong @Coteh @lszomoru and others