This patch prevents frequent saves from making an excessively large number of
commits. With gac-debounce-interval (a buffer-specific variable) set to a number
representing seconds, buffers with git-auto-commit-mode active will only make
Git commits at the end of the given interval after a save. So with
gac-debounce-interval set to 300, a buffer will commit changes accumulated over
5 minutes, rather than at every save. It will also commit if the buffer is
killed.
This mode of operation can be made default with, e.g.:
(setq-default gac-debounce-interval 300)
- Uses double-quotes for commit message to support filenames with spaces
on Windows
- file-name-nondirectory is necessary for Windows support, otherwise the
drive name (C:\) is included in the path
When this option is enabled, whenever a commit is about to be made a
summary of the commit's changes is asked of the user. If no summary is
given, or if the option is nil, use the relative file-name.
It is normal for boolean values, or predicates, to end with `-p' in
emacs-lisp, so `gac-automatically-push' should really be named
`gac-automatically-push-p'.
Add the ability to automatically push changes after commits. This just
calls `git push', so upstream and such should already have been set
up.
Setting `git-automatically-push' to `t' enables this functionality.
I refused to do this before because it reminds me too much of .Net's
Global Assembly Cache. Now I feel I need it, though, since
`git-auto-commit' is too long.