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

How to use `gac-default-message`? #34

Closed systemhalted closed 4 years ago

systemhalted commented 4 years ago

Sorry for repeated questions. When I use following settings

((nil 
  (eval git-auto-commit-mode 1)
  (gac-automatically-push-p . t)
  (gac-debounce-interval . 60)
  (gac-default-message . "Update the worklist")))

I see GAC auto commits and pushes changes however the commit message does not get impacted. This is how the commit history looks like

commit 15318dcbf184aa09fd991cb2a719735e1c1ad782 (HEAD -> master, origin/master)
Author: Palak Mathur 
Date:   Fri Sep 25 12:15:19 2020 -0500

    ../../../org/inbox.org

commit 6a919ed8bdba1fbd7ce6807e544398b6751f69f2
Author: Palak Mathur
Date:   Fri Sep 25 11:19:31 2020 -0500

    ../../../org/inbox.org

commit d078afc535200767f9ca809fc3a03e370e865b00
Author: Palak Mathur 
Date:   Fri Sep 25 11:17:07 2020 -0500

    ../../../org/inbox.org

commit 6b38a3616ed4480cff519c543ca2500e4e4d0d6a
Author: Palak Mathur 
Date:   Fri Sep 25 11:02:57 2020 -0500

    **Update the worklist**

If you notice after few commits, the default message is getting used. What am I going wrong?

ryuslash commented 4 years ago

Hey :)

This looks like it worked at first, but then was reset? Were both running from ../../../org/inbox.org? Or is it possible that you had indox.org open already and the one that did use the default message was a newly opened file? When you change the contents of the .dir-locals.el you have to revert any buffers under that directory for the changes to take effect.

systemhalted commented 4 years ago

Thank you. I think that was the problem.