git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wilbert van Dolleweerd <wilbert@arentheym.com>
To: Git ML <git@vger.kernel.org>
Subject: Is there a specific reason that git gui does not respect comment lines added by a git hook?
Date: Wed, 26 Jan 2011 11:14:28 +0100	[thread overview]
Message-ID: <AANLkTingTLM8MCEBdS_4OAE5DU1L4xndRzQMq_gdvKaL@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-01-26 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 10:14 Wilbert van Dolleweerd [this message]
2011-01-29 22:45 ` Is there a specific reason that git gui does not respect comment lines added by a git hook? David Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTingTLM8MCEBdS_4OAE5DU1L4xndRzQMq_gdvKaL@mail.gmail.com \
    --to=wilbert@arentheym.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).