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] Add extension api event for when a file is commit #20845

Closed
eamodio opened this issue Feb 18, 2017 · 7 comments
Closed

[git] Add extension api event for when a file is commit #20845

eamodio opened this issue Feb 18, 2017 · 7 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@eamodio
Copy link
Contributor

eamodio commented Feb 18, 2017

  • VSCode Version: 1.10.0-insider 50f8848
  • OS Version: macOS Sierra 10.12.3 (16D32)

I would love to be able to listen for an event for when the a file in an open editor has been committed. Currently we have api events for when a document changes and is saved, but nothing for when a document is commit.

Specifically this would help out GitLens, to where I could avoid issues where the blame continues to show "Uncommitted changes" because I haven't detected that the file has been committed.

@joaomoreno
Copy link
Member

You should listen to file system events on the .git folder because the user might actually commit the file outside of VS Code.

@joaomoreno joaomoreno added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Feb 21, 2017
@eamodio
Copy link
Contributor Author

eamodio commented Feb 21, 2017

@joaomoreno that is an excellent suggestion! Thanks so much.

@eamodio
Copy link
Contributor Author

eamodio commented Feb 21, 2017

@joaomoreno but at the same time. Vscode must already be doing this to update it's tracking. And with more scm's being added an abstract event would seem to me to be very valuable

@joaomoreno
Copy link
Member

Code is listening. But it won't tell you that a file has been committed. At best, it can tell you that something has changed. Which is exactly what you can do with FS events.

@eamodio
Copy link
Contributor Author

eamodio commented Feb 21, 2017

True, but when there are multiple different SCM providers, it allows an extension to not have to know about the details of each one (and vscode will already need to know).

@joaomoreno
Copy link
Member

joaomoreno commented Feb 21, 2017

It won't actually know. The SCM support is more abstract than that, since some SCM systems don't even have the commit concept.

@eamodio
Copy link
Contributor Author

eamodio commented Feb 21, 2017

Sorry, I was conflating things. I just meant a general SCM changed type of event (with optional other details if possible - but would be specific to the SCM)

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants