On Sat, Aug 16, 2014 at 5:38 PM, Edward K. Ream <edream...@gmail.com> wrote:
> Interestingly, the Git error message actually gives the name of the > temporary file that we want to get. Something like:: > > C:\Users\edreamleo\AppData\Local\Temp\e2d01fyz.nak > > So the question is, how to pass this file to commit-msg.py. Success! I googled "git hooks on windows" and got: http://stackoverflow.com/questions/18277429/executing-git-hooks-on-windows QQQ By default, Git for Windows executes hook scripts using its own Windows port of the bash shell. [snip] #!/bin/sh c:/Programs/PHP/php.exe c:/Data/Scripts/git-pre-push.phpcli "$@" QQQ So, I just added "$@" to get the arguments. That is, commit-msg is now:: #!/bin/sh c:/Python27/python.exe C:/leo.repo/leo-editor/.git/hooks/commit-msg.py "$@" Now the commit "takes" and commit_timestamp.json is:: { "asctime": "Sat Aug 16 17:47:46 2014", "parent": "6d9af6f59679757d6d4fd34b9f3b66dc1d64be46", "timestamp": "20140816174746" } If I reload Leo, I get this in the log:: Leo 4.11 final, build 20140816174746, Sat Aug 16 17:47:46 2014 Git repo info: branch = master, commit = 50363ba888b4 This commit is correct, I have no idea whether the parent in the json is used. Hmmm. Maybe I had better update pre-commit too. Hehe. Edward ------------------------------------------------------------------------------------------ Edward K. Ream: edream...@gmail.com Leo: http://leoeditor.com/ Speak the truth, but not to punish--Thich Nhat Hanh ------------------------------------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.