Background: the current text editor i am using does not have built-in support for git. Nevertheless, it has support for user-created addons, so I made one for auto-commiting to the repository each time I save a file.
Although auto-saving to the repository is straightforward, the commit messages currently are not very useful, they just slap the current date and time with the text “auto saved” as the commit message.
In looking at this situation I thought it might be helpful to find out how text editors handle the issue of letting the user specify a different commit message each time they save a file (if wanted).
Question: How do text editors unobtrusively allow the user to specify a non-automated commit message? Does the user get presented with a pop-up dialog box? Does the editor provide a scratch buffer that does nothing but act as a temporary storage for the commit message? Is there a way this can be done without feeling like a “nag screen” after a while?
I think you can get the vast majority of what you are looking for without being too clever. How about two paths for the add-on, one auto-save as you currently have described with a generic auto save commit message.
A second “intentional” commit/save where you as the user are requesting the commit message screen for the commit entry. This would be an additional macro/hot-key/button from your add-on that you use for explicitly typing in the commit message where the “auto save” functionality is just that, auto save.
Keep track and only auto-save when changes between intentional saves and auto saves have occurred. Straightforward and gives you auto saves without nag screens with the flexibility to add explicit commit messages.
Best of luck.