Re: Log messages beginning # and git rebase -i
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 28, 2015, 16:30 UTC
- Message-ID
- <xmqqr3nsfdmw.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <vpqsi88qp6q.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 23 quoted lines
> 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?