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

Is there a specific reason that git gui does not respect comment lines added by a git hook?

From
Wilbert van Dolleweerd <wilbert@arentheym.com>
Date
Jan 26, 2011, 10:14 UTC
Message-ID
<AANLkTingTLM8MCEBdS_4OAE5DU1L4xndRzQMq_gdvKaL@mail.gmail.com>
Hello,

I've written a prepare-commit-msg hook that maps Team Foundation Server workitem ID's to a Git commit message. (When committing, a picklist appears. Users can select one or more workitems and the workitems are added to the commit message using a specific format. Later on, we use git log --grep to search for specific commits belonging to a workitem).

I'm using comments in the commit message to give additional information to the user. For example, when the Team Foundation Server is not available, I add the following comment to the top of the commit message.

# Warning: could not access Team Foundation Server at <servername>. Check your configuration or manually enter your workitem.

Because the line starts with a # sign, it is not added to the actual commit message...when using git commit. If I use git gui, the above comment appears in the git gui interface but *is* actually added to the git commit message when committing.

Is there a specific reason that git gui is actually adding lines starting with a # sign? I was expecting it to ignore those lines.

-- 
Kind regards,

Wilbert van Dolleweerd
Blog: http://walkingthestack.wordpress.com/
Twitter: http://www.twitter.com/wvandolleweerd
Next: David Aguilar
Message 1 of 2 in “Is there a specific reason that git gui does not respect comment lines added by a git hook?”
  1. Wilbert van DolleweerdJan 26, 2011
  2. David AguilarJan 29, 2011

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.