git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Jeff King <peff@peff.net>, git <git@vger.kernel.org>
Subject: Re: 'git interpret-trailers' is tripped by comment characters other than '#'
Date: Mon, 17 Jun 2019 22:07:50 +0200	[thread overview]
Message-ID: <CAP8UFD3EaR=PRsN9sEEAOOdqQxPeZ1wiiWrVeBKQv8AW1zY1ig@mail.gmail.com> (raw)
In-Reply-To: <xmqqtvcoruda.fsf@gitster-ct.c.googlers.com>

On Mon, Jun 17, 2019 at 7:31 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Christian Couder <christian.couder@gmail.com> writes:
>
> > On Mon, Jun 17, 2019 at 6:33 AM Masahiro Yamada
> > <yamada.masahiro@socionext.com> wrote:
> >>
> >> On Sat, Jun 15, 2019 at 5:41 PM Christian Couder
> >> <christian.couder@gmail.com> wrote:
> >> >
> >> > > I do wonder if the trailer code is correct to always respect it, though.
> >> > > For example, in "git log" output we'd expect to see commit messages from
> >> > > people with all sorts of config. I suppose the point is that their
> >> > > comment characters wouldn't make it into the commit object at all, so
> >> > > the right answer there is probably not to look for comment characters at
> >> > > all.
> >> >
> >> > Would you suggest an option, maybe called `--ignore-comments` to ignore them?
> >>
> >> Since 'git interpret-trailers' already ignores lines starting with '#',
> >> is this option true by default?
> >
> > Sorry, I should have suggested something called --unstrip-comments or
> > --ignore-comment-char that would make 'git interpret-trailers' stop
> > stripping lines that start with the comment character.
>
> So, to summarize:
>
>  - As the traditional behaviour is to strip comment, using the
>    hardcoded definition of the comment char, i.e. '#', we do not
>    switch the default.  Instead, a new command line option makes
>    it pretend there is no comment char and nothing get stripped.

Yeah, that's the idea of --unstrip-comments (or
--ignore-comment-char). I am ok with preparing and sending a patch to
add that, though it is not urgent and it would be nice if we could
agree with the name first.

>  - But the core.commentchar that does not override hardcoded
>    definition is a bug, so we'd fix that along the lines of what
>    Peff's patch outlined.

Yeah, not sure if Peff wants to resend his patch with a proper commit
message. I would be ok with doing it if he prefers.

Thanks,
Christian.

  reply	other threads:[~2019-06-17 20:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:35 'git interpret-trailers' is tripped by comment characters other than '#' Masahiro Yamada
2019-06-14 15:07 ` Jeff King
2019-06-15  8:41   ` Christian Couder
2019-06-17  4:32     ` Masahiro Yamada
2019-06-17  5:03       ` Christian Couder
2019-06-17 17:31         ` Junio C Hamano
2019-06-17 20:07           ` Christian Couder [this message]
2019-06-18  2:41             ` Masahiro Yamada
2019-06-19  3:37     ` [PATCH] interpret-trailers: load default config Jeff King
2019-06-19 14:24       ` Junio C Hamano
2019-06-19 17:47         ` Jeff King
2019-06-19 15:52       ` Masahiro Yamada
2019-06-17  4:32   ` 'git interpret-trailers' is tripped by comment characters other than '#' Masahiro Yamada

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAP8UFD3EaR=PRsN9sEEAOOdqQxPeZ1wiiWrVeBKQv8AW1zY1ig@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=yamada.masahiro@socionext.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).