All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: kusmabite@gmail.com
Cc: David Wade <DAWAD@statoil.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Is this a bug?
Date: Tue, 19 Feb 2013 18:02:12 +0700	[thread overview]
Message-ID: <CACsJy8DjatRbL=J-MZmQFnd+_7i-WwYHSnkY_ga++fx1R5Whmw@mail.gmail.com> (raw)
In-Reply-To: <CABPQNSY4ordHh2ee8mk-2kCD40+sMf_SxrjfzGbkyGGTNW1TzA@mail.gmail.com>

On Tue, Feb 19, 2013 at 4:47 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Feb 19, 2013 at 10:32 AM, David Wade <DAWAD@statoil.com> wrote:
>> Hi,
>>
>> I wrote a commit message beginning with a hash (#) character, like this: 'git commit -m "#ifdef ...." '
>>
>> Everything went okay when committing, but then I tried 'git commit -amend' and without editing the commit message I was told I had an empty commit message.
>>
>> Is this a problem with my text editor (vim 7.2) or git itself? (git version 1.7.2.2 under RedHat 5.8) Or something I'm not supposed to do ;-) ?
>
> The problem is that when doing interactive editing of messages (like
> 'git commit --amend' does), git considers '#' as a comment-character.
> You can disable this by using the --cleanup=verbatim switch (or some
> other suiting cleanup-setting, see 'git help commit').

Nobody is always conscious about the leading # in commit message to do
that. I once edited a commit message and the auto-wrap feature put '#'
at the beginning of the line. I saved and went on without noticing one
line was lost until much later :( Perhaps we should change the comment
signature a bit to reduce accidents, like only recognize '#' lines as
comments after a special line like

# this is not a comment
### START OF COMMENT ###
# this is a comment
-- 
Duy

  reply	other threads:[~2013-02-19 11:03 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19  9:32 Is this a bug? David Wade
2013-02-19  9:42 ` Andreas Ericsson
2013-02-19  9:47 ` Erik Faye-Lund
2013-02-19 11:02   ` Duy Nguyen [this message]
2013-02-22 19:29     ` Phil Hord
2013-02-22 21:48       ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2017-06-21  3:08 Peter Teoh
2011-06-21 21:57 Is this a Bug? Christian Deussen
2011-06-21 22:49 ` Greg Freemyer
2011-06-22  7:28   ` Wilson Felipe
2011-06-22 19:50     ` julie Sullivan
2011-06-22 21:21       ` julie Sullivan
2011-06-23 12:16         ` Christian D.
2011-06-23 13:03           ` Jonathan Neuschäfer
2011-06-23 18:49 ` Jonathan Neuschäfer
2011-04-02  8:05 Is this a bug? Ding Dinghua
2011-04-02 16:32 ` Amir Goldstein
2011-04-03  9:24   ` Ding Dinghua
2011-04-03 14:51     ` Yongqiang Yang
2011-04-03 15:44       ` Amir Goldstein
2011-03-24  0:46 is " Jay
2011-03-25 15:18 ` Steven Rostedt
2005-08-20  0:14 is this a bug ? Ashwin Chaugule
2005-08-19 13:19 ` Thomas Gleixner
2005-08-20  1:36   ` Ashwin Chaugule
2005-08-19 18:25     ` Thomas Gleixner
2005-08-19 19:31       ` ashwinc
2002-07-15 13:57 Is this a bug? Tisserand Patrice
2002-07-15 14:08 ` Takashi Iwai
2001-08-07 11:51 is " Thodoris Pitikaris
2001-08-07 13:51 ` Andrzej Krzysztofowicz
2001-08-08  2:19 ` Dr. Kelsey Hudson
2001-08-08  3:15   ` J Sloan
2001-08-08  3:45     ` Dr. Kelsey Hudson
2001-08-08 10:53       ` David Weinehall
2001-08-08 11:05   ` Alan Cox
2001-08-08 12:59   ` Ron Flory
2001-08-08 16:51 ` jury gerold
2001-08-10  9:12   ` Eric W. Biederman
2001-08-10 12:22     ` jury gerold
2001-08-10 16:22       ` Eric W. Biederman

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='CACsJy8DjatRbL=J-MZmQFnd+_7i-WwYHSnkY_ga++fx1R5Whmw@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=DAWAD@statoil.com \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.