Skip to content

BlameCommand: Notice when the file is unsaved: #26

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

Merged
merged 1 commit into from
May 13, 2018
Merged

BlameCommand: Notice when the file is unsaved: #26

merged 1 commit into from
May 13, 2018

Conversation

frou
Copy link
Owner

@frou frou commented May 13, 2018

Querying blame information for a file with unsaved modifications shouldn't be allowed. This is because the line-number of the text caret in the in-memory representation of the file has a high chance of referring to an unrelated line in the on-disk representation of the file. Since git blame operates solely with on-disk representation, bogus information could be shown in the phantom because of this discrepancy.

BlameShowAllCommand already protects against this.

Querying blame information for a file with unsaved modifications shouldn't be allowed. This is because the line-number of the text caret in the in-memory representation of the file has a high chance of referring to an unrelated line in the on-disk representation of the file. Since `git blame` operates solely with on-disk representation, bogus information could be shown in the phantom because of this discrepancy.

BlameShowAllCommand already protects against this.
@psykzz psykzz merged commit 074d66e into frou:master May 13, 2018
@psykzz
Copy link
Collaborator

psykzz commented May 13, 2018

Merged 👍 Thank you!

@frou frou mentioned this pull request Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants