From: David Aguilar <davvid@gmail.com>
To: Wilbert van Dolleweerd <wilbert@arentheym.com>
Cc: Git ML <git@vger.kernel.org>
Subject: Re: Is there a specific reason that git gui does not respect comment lines added by a git hook?
Date: Sat, 29 Jan 2011 14:45:30 -0800 [thread overview]
Message-ID: <20110129224528.GA7676@gmail.com> (raw)
In-Reply-To: <AANLkTingTLM8MCEBdS_4OAE5DU1L4xndRzQMq_gdvKaL@mail.gmail.com>
On Wed, Jan 26, 2011 at 11:14:28AM +0100, Wilbert van Dolleweerd wrote:
> Hello,
>
> I've written a prepare-commit-msg hook [...snip...]
> 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.
I have the impression that you're running into this behavior
because this information is at the top of the commit message
(line 1). Users then fill in the actual message on the
lines below this, I presume?
Try to see what happens if you set it up so that users fill
in the commit message above the auto-generated comment.
I have a feeling that it only strips out '#' lines after
it's read in the commit message proper.
I haven't read the code so I'm not certain of this, but it seems
like that is what's going on. Also, "git gui" uses plumbing
commands underneath the hood and does not actually call
"git commit" directly. That might help explain this subtle
difference in behavior.
> 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
--
David
prev parent reply other threads:[~2011-01-29 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 10:14 Is there a specific reason that git gui does not respect comment lines added by a git hook? Wilbert van Dolleweerd
2011-01-29 22:45 ` David Aguilar [this message]
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=20110129224528.GA7676@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=wilbert@arentheym.com \
/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).