ryuslash / git-auto-commit-mode

Automatically commit to git after each save
http://projects.ryuslash.org/git-auto-commit-mode/
GNU General Public License v3.0
167 stars 26 forks source link

Make commit message function customizable, allow empty Git message #12

Closed lukateras closed 7 years ago

lukateras commented 7 years ago

Hi! I want to use your mode with empty Git messages. I've added gac-commit-message-function that stores an anonymous function that takes a Git path and returns the corresponding Git commit message. I've also added --allow-empty-message flag to git commit.

This change should be perfectly reverse-compatible with existing users.

Kaligule commented 7 years ago

personally I would like to be able to controll wether empty messages are allowed. If they aren't I can just write nothing into the summary to not commit. Could we have a boolean variable for that?

lukateras commented 7 years ago

@Kaligule Sure: see the last commit, gac-allow-empty-message variable.

Kaligule commented 7 years ago

Cool thing. Thank you.

lukateras commented 7 years ago

However, it probably makes more sense to have a more general custom variable, e.g. a lambda function that is given Git commit message as an argument that returns Git shell command.

lukateras commented 7 years ago

I'm not interested in pushing this anymore, so if someone wants to get this merged, feel free to use my fork.