Skip to content

Handle file renames better at Git layer #82

@wincent

Description

@wincent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions