git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: anikey <arty.anikey@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git Bug - diff in commit message.
Date: Thu, 08 Sep 2011 10:27:14 -0700	[thread overview]
Message-ID: <7v39g7x7v1.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1315493353942-6772145.post@n2.nabble.com> (anikey's message of "Thu, 8 Sep 2011 07:49:13 -0700 (PDT)")

anikey <arty.anikey@gmail.com> writes:

> Hi, peops. I'm pretty much sure that's a bug.

I am not Peops, but will try to help ;-).

As "rebase" is essentially "format-patch" output piped into "am",
unindented diff in a random place inside the commit message will be
indistingushable from the beginning of the patch. You cannot have an
unadulterated "diff" output in your commit message for this reason, and
this is not likely to change.

Often what people do is to indent them, as the reason they quote patch in
the message is to make it serve as a supporting material. Incidentally,
that makes the resulting commit log message easier to read as well; e.g.

        Fix bloop bug

        An earlier commit had this patch that is quite bogus.

            diff --git a/bloop.php b/bloop.php
            index 937da74..0e8440d 100644
            --- a/bloop.php
            +++ b/bloop.php
            @@ -42,7 +42,7 @@
            ...

        The assignment to frotz in the above hunk should happen after
        nitfol variable is initialized.

        This patch fixes it.

        Signed-off-by: Cont Ributer <contributor@example.com>

      parent reply	other threads:[~2011-09-08 23:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 14:49 Git Bug - diff in commit message anikey
2011-09-08 16:26 ` Michael Witten
2011-09-09  0:56   ` Thomas Rast
2011-09-09  6:14     ` Johannes Sixt
2011-09-09 16:00   ` Junio C Hamano
2011-10-11 23:00     ` Junio C Hamano
2011-10-24 23:24       ` Martin von Zweigbergk
2011-10-25 14:11         ` Junio C Hamano
2011-09-08 17:27 ` Junio C Hamano [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=7v39g7x7v1.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=arty.anikey@gmail.com \
    --cc=git@vger.kernel.org \
    /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).