I'm trying to use a
.dir_locals.el file to override the author field in Git commits (so when I'm committing something in a work repo, I use my work email).
It looks like
magit-commit-arguments is what I need to frob, but I can't seem to get it to work. I've tried the following:
((nil . ((magit-commit-arguments . ("--author John SJ Anderson <firstname.lastname@example.org>")))))
but it doesn't take effect. The variable's local value does get set, but either Magit ignores it, or I get various type mismatch errors from different levels of the Magit code.
(Note: I have a bunch of work repos, and I don't want to set this on an individual repo level in each individual
.git/config. I'm also not interested in solutions outside of Emacs; I already have a solution that works from the CLI, but it depends on environment variables and won't easily port to Emacs. I want something that will work, with Magit, inside Emacs.)