Re: [RFC/PATCH] commit: update the index after running the pre-commit hook
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 18, 2010, 20:30 UTC
- Message-ID
- <7vwrrn8xz5.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1282139649-21097-1-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Change git-commit to update the index after running the pre-commit > hook, but before it constructs the comments that'll accompany the > commit message displayed in the $EDITOR.
Hmm.
I have always thought that "pre-commit" is about verification, just like other pre-anything hooks. We have never sanctioned it to modify the tree, and the document does not say the hook is allowed to.
Although I am not opposed to this patch, it is a change to the defined semantics that is somewhat worrysome. We probably should document what it is and is not allowed to a bit better.