All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Michaël Fortin" <fortinmike@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Unexpected behavior when git-adding files in a pre-commit hook then using "git commit -o"
Date: Mon, 04 May 2015 11:03:32 -0700	[thread overview]
Message-ID: <xmqqvbg8rzij.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <463FC822-916F-4160-A1F2-B4AAEFF3A5B2@gmail.com> ("Michaël Fortin"'s message of "Mon, 4 May 2015 08:33:39 -0400")

Michaël Fortin <fortinmike@gmail.com> writes:

> I’ve encountered unexpected behavior performing a git add from a
> pre-commit hook, followed by performing a commit using the “-o”
> flag,...

As pre-commit is a verification (and rejection) mechanism, not a
mechanism to tweak what is to be commited, it is totally expected
that its behaviour is unspecified when you modify anything in it.

I think I saw a similar confusion posted to the list once in the
past few years.  Perhaps we would need a documentation patch to
clarify this.

Thanks.

      reply	other threads:[~2015-05-04 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 12:33 Unexpected behavior when git-adding files in a pre-commit hook then using "git commit -o" Michaël Fortin
2015-05-04 18:03 ` 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=xmqqvbg8rzij.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=fortinmike@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.