prepare message template tortoisegit

21 views Asked by At

I am working on a template for my commit message in Git. the Template.txt this template has a version number and a ticket number, these two pieces of information are updated with every commit. The Template.txt is created with a Python script I wrote.
and I use tortisegit. Here is the problem:

when i press commit in tortisegit, the message in the commit message dialog is the old message with an old version number and an old ticket number. when i close it and press commit again, everything works fine, but i don't want to press 2 times to get the right number. i use the start commit hook, which should be executed before the commit.

So the workflow should look like this:

  1. press commit in Tortoisegit
  2. start commit hook is activated
  3. python script is executed
  4. template.txt is created
  5. message is written to the dilog.

but the workflow is approximately as follows

  1. press commit in Tortoisegit
  2. the message is written to the dilog
  3. start-commit hook is activated
  4. python script is executed
  5. template.txt is created

Do you have any idea how I can configure it so that my Python script is executed and the template is created first before the message is displayed?

0

There are 0 answers