git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Maxime Louet <maxime@saumon.io>
Cc: git@vger.kernel.org
Subject: Re: Verbose commit message diff not showing changes from pre-commit hook
Date: Sat, 25 Jul 2020 08:00:13 -0700	[thread overview]
Message-ID: <xmqqr1sziqrm.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CADv3qkGq3jA8iXsjhrqfsUX=gW+KOuLyeVgDzmku1tUpsMdvtw@mail.gmail.com> (Maxime Louet's message of "Sat, 25 Jul 2020 16:47:19 +0200")

Maxime Louet <maxime@saumon.io> writes:

> Is this expected behaviour? I find it somehow confusing that the diff
> in the commit message isn't the actual commit diff.

Since the designed purpose of pre-commit hook is to examine the
contents to be committed and reject the attempt to commit if there
is something wrong found, and Git does not expect it to munge the
contents to be committed, if the hook does so, you would get an
undefined behaviour.  So anything is totally expected at that point.

Thanks.



  reply	other threads:[~2020-07-25 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 14:47 Verbose commit message diff not showing changes from pre-commit hook Maxime Louet
2020-07-25 15:00 ` Junio C Hamano [this message]
2020-07-25 15:31   ` Junio C Hamano
2020-07-26 17:41     ` René Scharfe
2020-07-26 19:45       ` Maxime Louet
2020-07-27 18:13       ` Paolo Bonzini

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=xmqqr1sziqrm.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=maxime@saumon.io \
    /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).