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 14:19:04 -0700 [thread overview]
Message-ID: <CAPc5daWZofdZnE0VQyFX2sBQyEDvAPmU+4rmHe5rvh7eH001ZA@mail.gmail.com> (raw)
In-Reply-To: <2ED67396-2530-4D1C-8F21-1C30983DB9DC@kellerfarm.com>
On Fri, Jul 15, 2016 at 1:30 PM, Andrew Keller <andrew@kellerfarm.com> wrote:
> Am 15.07.2016 um 12:34 nachm. schrieb Andrew Keller <andrew@kellerfarm.com>:
>
>> I pulled out the source for version 2.9.1 and briefly skimmed how run_commit and
>> prepare_to_commit work. It seems that Git already understands that a pre-commit
>> hook can change the index, and it rereads the index before running the
>> prepare-commit-msg hook: https://github.com/git/git/blob/v2.9.1/builtin/commit.c#L941-L951
>
> Quick question: Why does Git reread the index after the pre-commit hook runs?
Offhand I do not think of a good reason to do so; does something break
if you took it out?
next prev parent reply other threads:[~2016-07-15 21:19 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
2016-07-15 17:42 ` Andrew Keller
2016-07-15 20:30 ` Andrew Keller
2016-07-15 21:19 ` Junio C Hamano [this message]
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=CAPc5daWZofdZnE0VQyFX2sBQyEDvAPmU+4rmHe5rvh7eH001ZA@mail.gmail.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).