git-auto-commit-mode icon indicating copy to clipboard operation
git-auto-commit-mode copied to clipboard

Risky variable?

Open AndreaCrotti opened this issue 2 years ago • 1 comments

I have a project with notes set to auto push, and for every single file it asks me to confirm. I finally understood that it's because the var itself is declared as risky, but does it need to be?

(defcustom gac-automatically-push-p nil
  "Automatically push after each commit.

If non-nil a git push will be executed after each commit."
  :tag "Automatically push"
  :group 'git-auto-commit-mode
  :type 'boolean
  :risky t)
(make-variable-buffer-local 'gac-automatically-push-p)

AndreaCrotti avatar Feb 10 '23 20:02 AndreaCrotti

I figured that since it'll runs an operation that isn't easily revertible, and might not exactly be what you think it is, depending on the settings in git, it should be risky. I'm not sure if it needs to be risky or not, but you should be able to permanently accept the value as safe in your configuration. Normally when it asks you to confirm if this setting is acceptable you can answer ! to tell Emacs you always accept. Although there are also settings that change that as well.

ryuslash avatar Mar 12 '23 00:03 ryuslash