From: Junio C Hamano <gitster@pobox•com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
Cc: Ed Avis <eda@waniasset•com>, git@vger•kernel.org
Subject: Re: Log messages beginning # and git rebase -i
Date: Tue, 28 Jul 2015 09:30:47 -0700 [thread overview]
Message-ID: <xmqqr3nsfdmw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpqsi88qp6q.fsf@anie.imag.fr> (Matthieu Moy's message of "Tue, 28 Jul 2015 17:25:49 +0200")
Matthieu Moy <Matthieu.Moy@grenoble-inp•fr> writes:
> Ed Avis <eda@waniasset•com> writes:
>
>> Eric Sunshine <sunshine <at> sunshineco.com> writes:
>>
>>>>the editing for the
>>>>combined log message treats lines beginning with # as comments. This means
>>>>that if you are not careful the commit message can get lost on rebasing.
>>>>
>>>>I suggest that git rebase should add an extra space at the start
>>
>>>'git rebase --interactive' respects the core.commentChar configuration
>>>variable, which you can set to some value other than '#'.
>>
>> I was thinking of the default configuration. But you are right, this applies
>> to whatever the comment character is - so if commentChar is set to * for
>> example, then log lines beginning with * should get an extra space prepended
>> in git rebase --interactive so that they don't get lost.
>
> Actually, is there any reason why we do not allow a simple escaping like
>
> \# this is a line starting with #
> \\ this is a line starting with \
> # this is a comment
What are we trying to achieve?
Munging the original "# I want this line intact" to any other form
like " # I want this..." is as bad as losing it. If the user wants
whatever she types in the resulting commit literally, there is the
"--cleanup=<choice>" option, no?
next prev parent reply other threads:[~2015-07-28 16:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 11:38 Log messages beginning # and git rebase -i Ed Avis
2015-07-27 23:25 ` Eric Sunshine
2015-07-28 0:53 ` Duy Nguyen
2015-07-28 9:51 ` Ed Avis
2015-07-28 15:25 ` Matthieu Moy
2015-07-28 16:30 ` Junio C Hamano [this message]
2015-07-28 16:40 ` Ed Avis
2015-07-28 17:48 ` Matthieu Moy
2015-07-28 18:44 ` Junio C Hamano
2015-07-29 10:17 ` Matthieu Moy
2015-07-29 10:19 ` Ed Avis
2019-04-22 10:05 ` [PATCH] allow commentChars in commit messages Corentin BOMPARD
2015-07-29 10:47 ` Log messages beginning # and git rebase -i Duy Nguyen
2015-07-29 12:17 ` Matthieu Moy
2015-07-29 12:47 ` Duy Nguyen
2015-07-29 15:54 ` Junio C Hamano
2015-07-29 16:03 ` Matthieu Moy
2015-07-29 17:02 ` Junio C Hamano
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=xmqqr3nsfdmw.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=Matthieu.Moy@grenoble-inp$(echo .)fr \
--cc=eda@waniasset$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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