git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] completion: Add hook in Bash completion for commit message; docs

From
Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Date
Jun 30, 2024, 21:33 UTC
Message-ID
<20240630213336.2212166-3-mikko.koivunalho@iki.fi>
In-Reply-To
<20240630213336.2212166-1-mikko.koivunalho@iki.fi>
Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
---
 Documentation/config/completion.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/Documentation/config/completion.txt b/Documentation/config/completion.txt
index 4d99bf33c9..5032eab5da 100644
--- a/Documentation/config/completion.txt
+++ b/Documentation/config/completion.txt
@@ -5,3 +5,14 @@ completion.commands::
 	can add more commands, separated by space, in this
 	variable. Prefixing the command with '-' will remove it from
 	the existing list.
+
+completion.commitMessageCallback::
+    This is only used by git-completion.bash for declaring an executable
+    or a shell function which will be used when user types
+    `git commit --message=` and then presses completion key (TAB).
+    The callback must return one string for commit message.
+    This can be used when all commit messages must have, for example,
+    same prefix, e.g. a work order number.
+    Instead of this configuration variable, environment variable
+    GIT_COMPLETION_COMMIT_MESSAGE_CALLBACK can be used.
+    Environment variable overrides the configuration variable.
-- 
2.30.2
Previous: Mikko Johannes KoivunalhoNext: Mikko Johannes Koivunalho
Message 2 of 6 in “Add a Hook To git commit --message Bash Completion”
  1. 0/3 Add a Hook To git commit --message Bash CompletionMikko Johannes Koivunalho, Jun 30, 2024
  2. 2/3 completion: Add hook in Bash completion for commit message; docsMikko Johannes Koivunalho, Jun 30, 2024
  3. 3/3 completion: Add hook in Bash completion for commit message; testsMikko Johannes Koivunalho, Jun 30, 2024
  4. 1/3 completion: Add hook in Bash completion for commit messageMikko Johannes Koivunalho, Jun 30, 2024
  5. brian m. carlsonJun 30, 2024
  6. Mikko Johannes KoivunalhoJun 30, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.