Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There could be several reasons why Change-id is not being generated despite the presence of .git/hooks/commit-msg:

  1. The commit message hook script may not be executable: Make sure that the script has the execute permission, i.e., the script should be able to run.

  2. The commit message hook script may be overridden by a global hook script: If a global hook script is present in the Git configuration, it may override the local commit message hook script.

  3. The commit message hook may not be getting triggered: Check that the hook script is being triggered by Git when creating a commit. You can add an "echo" statement at the beginning of the script to check if it is getting executed.

  4. The commit message may not satisfy the required format: The commit message must follow a specific format to generate a Change-id. Make sure that the commit message contains the required elements, such as a specific header, body, and footer.

  5. The repository may not be using Gerrit: Change-id is a feature provided by the Gerrit code review system. If the repository is not configured to use Gerrit, Change-id will not be generated.

  6. The commit-msg hook may not be linked to Gerrit: The commit-msg hook must be configured to use Gerrit to generate a Change-id. Make sure that the hook script is linked to the appropriate Gerrit server.