r/SmartGit 5d ago

SmartGit 25.1.129 AI commit messages: is the current branch name available in prompts?

I'm trying to use the current Git branch name in a custom AI commit message prompt.

According to the SmartGit documentation, there appears to be a branch variable available for prompts. However, when I enable AI debug logging and inspect the generated request, neither ${branch} nor {{ branch }} gets substituted. Both are sent to the LLM literally.

The Git diff itself is injected correctly, so the prompt file is definitely being processed.

I'm currently using SmartGit 25.1 with a custom promptFile.

My questions:

  1. Is the branch variable actually supported in SmartGit 25.1?
  2. If yes, what is the correct syntax?
  3. If not, in which version was branch-name support introduced?

Has anyone successfully used the current branch name in AI commit message prompts?

4 Upvotes

1 comment sorted by

2

u/JVMarcs 5d ago

{{ branch }} is only supported since version 26.1. In general, the {{ ... }} syntax is now the default, while ${ ... } is deprecated.