Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

[Memo] Adding a Changed file status. #151

Open
probablycorey opened this issue Oct 15, 2018 · 3 comments
Open

[Memo] Adding a Changed file status. #151

probablycorey opened this issue Oct 15, 2018 · 3 comments

Comments

@probablycorey
Copy link
Contributor

When I change a file, the file entry status remains ‘Unchanged’. I can’t tell if a file has been modified unless we compare it to the original file contents. Is this something that could be added to the API?

@as-cii
Copy link
Contributor

as-cii commented Oct 15, 2018

We think that this could be a good addition to the API. Naively, we could mark something as changed if there were any operations on the buffer. However, since these operations could cancel each other out, we actually still need to perform some kind of comparison which will end up being linear in the number of changes. This may perform better than a linear comparison of the contents of the previous and current buffer states however, so may be worth doing for convenience and optimality.

Our instinct is that ironing out issues related to resets should take precedence over this feature if you have a workaround.

@probablycorey
Copy link
Contributor Author

Our instinct is that ironing out issues related to resets should take precedence over this feature if you have a workaround.

That sounds right to me too. Let's pick this up after resets is working.

@nathansobo
Copy link

We made some progress toward this in #154, but we'll leave it open since we don't detect operations which cancel each other out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants