From: Junio C Hamano <gitster@pobox.com>
To: Andrew Keller <andrew@kellerfarm.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: obsolete index in wt_status_print after pre-commit hook runs
Date: Fri, 15 Jul 2016 10:28:52 -0700 [thread overview]
Message-ID: <xmqqshvan73f.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <B3E20AFF-7661-43A0-A715-F0B9F3CD58DC@kellerfarm.com> (Andrew Keller's message of "Fri, 15 Jul 2016 13:20:28 -0400")
Andrew Keller <andrew@kellerfarm.com> writes:
> On 15.07.2016, at 1:02 nachm., Junio C Hamano <gitster@pobox.com> wrote:
>
>> Expected outcome is an error saying "do not modify the index inside
>> pre-commit hook", and a rejection. It was meant as a verification
>> mechansim (hence it can be bypassed with --no-verify), not as a way
>> to make changes that the user didn't tell "git commit" to make.
>
> Ah! Good to know, then. I’ll rewrite my hook to behave more correctly.
No problem.
>> It is just the implementation that dates back to the old days were
>> too trusting that all users would behave (with its own definition of
>> "behaving well", which may or may not match your expectation), did
>> not anticipate that people would try to muck with the contents being
>> commited in the hook, and did not implement such verification.
Earlier you said you are working on a patch series. Since you have
already looked at the codepath already, perhaps you may want to try
a patch series to add the missing error-return instead, if you are
interested?
Thanks.
next prev parent reply other threads:[~2016-07-15 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 16:34 obsolete index in wt_status_print after pre-commit hook runs Andrew Keller
2016-07-15 17:02 ` Junio C Hamano
2016-07-15 17:20 ` Andrew Keller
2016-07-15 17:28 ` Junio C Hamano [this message]
2016-07-15 17:42 ` Andrew Keller
2016-07-15 20:30 ` Andrew Keller
2016-07-15 21:19 ` Junio C Hamano
2016-07-15 22:03 ` Junio C Hamano
2016-07-16 2:39 ` Andrew Keller
2016-08-03 18:25 ` Andrew Keller
2016-08-04 16:45 ` Junio C Hamano
2016-08-05 13:22 ` Andrew Keller
2016-07-16 2:23 ` Andrew Keller
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=xmqqshvan73f.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=andrew@kellerfarm.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).