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

Handle file renames better at Git layer #82

Open
wincent opened this issue Nov 25, 2021 · 0 comments
Open

Handle file renames better at Git layer #82

wincent opened this issue Nov 25, 2021 · 0 comments

Comments

@wincent
Copy link
Owner

wincent commented Nov 25, 2021

At the moment if you rename a note with, say, :Rename x.md, the file with the new name will correctly be added to Git, but the old one will just be marked as deleted from the index.

The commit is being invoked here in response to a BufWritePost autocmd. To handle renames (or straight-up deletions) we'd probably need to hook in to a different autocmd (this may produce two commits instead of one atomic commit, but that would be better than not recording the deletion in Git). Not sure if BufDelete gets called in this case, or something else — will have to look into it.

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

No branches or pull requests

1 participant