From: Philip Hofstetter <phofstetter@sensational.ch>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: git-mailinfo doesn't stop parsing at the end of the header
Date: Wed, 18 Nov 2009 20:57:16 +0100 [thread overview]
Message-ID: <aa2993680911181157y750eae95sc2932b03d938d6fb@mail.gmail.com> (raw)
In-Reply-To: <20091118172424.GA24416@coredump.intra.peff.net>
Hello,
On Wed, Nov 18, 2009 at 6:24 PM, Jeff King <peff@peff.net> wrote:
> 1. It creates a bad user experience. You are not unreasonable for
> wanting to put some specific text in your commit message. Having
> git come back and say "oops, I might get confused by this later"
> just seems like an annoyance to the user.
agreed, though it's not that bad: when learning git, you will be
confronted with the fact that the commit message has a few things that
are special (well. it's doesn't break git, but the first line should
be < 56 chars in length for example).
Not being able to have From: lines in them that are not describing an
author would then just be one of them.
> 2. Mailinfo has to deal with data created by older versions of git. So
> in your case, the rebase was a bomb waiting to go off. If we can
> fix it so that an existing bomb doesn't go off, rather than not
> creating the bomb in the first place, then we are better off.
This is a very good point. I didn't quite think about that.
> 4. Commit messages can come from other places than "git commit". What
> should we do with a commit message like this that is imported from
> SVN? Reject the import? Munge the message?
I would leave that to the tool that does the import. Probably it would
have to munge it. Yes.
I DO see though that implementing the check at commit time would lead
to problems popping up at other places.
> Of course all of that presupposes that we can correctly handle the
> existing data after the fact. Even with my patch, you still can't write
> "From: foo@example.com" as the first line of your commit body. But that
can't you? IMHO it would just attribute the commit to foo@example.com
which can be an equally bad, if not worse thing (I'm saying that
without the needed knowledge about git internals to really be sure, so
take this with a grain of salt)
I just have a bad feeling about trying out heuristics to see whether
thing thing after from: is an email address or not as email addresses
are notoriously hard to detect.
Typing a commit message and applying a patch from an email should be
separate things and should be handled separately. Currently they are
not and this is what's causing the problem in the first place.
Maybe that --strict thing is actually a good thing in the long run,
even though I don't quite like it either :-)
Interesting problem to have though.
Philip
prev parent reply other threads:[~2009-11-18 19:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 14:20 git-mailinfo doesn't stop parsing at the end of the header Philip Hofstetter
2009-11-18 15:51 ` Jeff King
2009-11-18 16:42 ` Jeff King
2009-11-18 22:45 ` [PATCH] git am/mailinfo: Don't look at in-body headers when rebasing Lukas Sandström
2009-11-18 23:47 ` Philip Hofstetter
2009-11-19 8:51 ` [PATCH v2] " Lukas Sandström
2009-11-19 15:36 ` Jeff King
2009-11-20 16:12 ` [PATCH] " Lukas Sandström
2009-11-18 17:11 ` git-mailinfo doesn't stop parsing at the end of the header Philip Hofstetter
2009-11-18 17:24 ` Jeff King
2009-11-18 17:46 ` Jakub Narebski
2009-11-18 18:42 ` Jeff King
2009-11-18 19:57 ` Philip Hofstetter [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=aa2993680911181157y750eae95sc2932b03d938d6fb@mail.gmail.com \
--to=phofstetter@sensational.ch \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).