diff --git a/README.org b/README.org index 9929ee9..ef8af5b 100644 --- a/README.org +++ b/README.org @@ -101,3 +101,11 @@ - =gac-debounce-interval= :: A number specifying a buffer between automatic commits in seconds. Wait with making an actual commit until this number of seconds elapses. + + - =gac-add-additional-flag= :: + A string that can be used to add additional command line flags to the ~git + add~ command. + + - =gac-commit-additional-flag= :: + A string that can be used to add additional command line flags to the ~git + commit~ command. diff --git a/git-auto-commit-mode.el b/git-auto-commit-mode.el index bc08c32..55f4849 100644 --- a/git-auto-commit-mode.el +++ b/git-auto-commit-mode.el @@ -75,6 +75,12 @@ If non-nil a git push will be executed after each commit." :group 'git-auto-commit-mode :type 'string) +(defcustom gac-commit-additional-flag "" + "Flag to add to the git commit command." + :tag "git commit flag" + :group 'git-auto-commit-mode + :type 'string) + (defcustom gac-debounce-interval nil "Debounce automatic commits to avoid hammering Git. @@ -169,7 +175,8 @@ Default to FILENAME." (shell-command (concat "git add " gac-add-additional-flag " " (shell-quote-argument filename) gac-shell-and - "git commit -m " (shell-quote-argument commit-msg))))) + "git commit -m " (shell-quote-argument commit-msg) + " " gac-commit-additional-flag)))) (defun gac-push (buffer) "Push commits to the current upstream.