Matthieu Moy [off-list ref] writes:
If after a failed "exec" instruction there are staged changes,...
I have to wonder why whatever "exec" runs is mucking with the index in the
first place. Shouldn't we forbid it?
On Wed, Aug 24, 2011 at 11:42:27AM -0700, Junio C Hamano wrote:
Matthieu Moy [off-list ref] writes:
quoted
If after a failed "exec" instruction there are staged changes,...
I have to wonder why whatever "exec" runs is mucking with the index in the
first place. Shouldn't we forbid it?
Certainly my only user has ever been "exec make test". But I wonder if
somebody is crazy enough to auto-generate some content and commit it.
OTOH, shouldn't it then be their responsibility to make the commit?
I.e., I can see at least the potential for mucking with the index, but I
really don't see a reason for _leaving_ the index in a mucked state.
-Peff
On Wed, Aug 24, 2011 at 04:20:27PM -0400, Jeff King wrote:
Certainly my only user has ever been "exec make test". But I wonder if
Er, s/user/use.
somebody is crazy enough to auto-generate some content and commit it.
OTOH, shouldn't it then be their responsibility to make the commit?
I.e., I can see at least the potential for mucking with the index, but I
really don't see a reason for _leaving_ the index in a mucked state.
Having just read your followup patch, it looks sane. Exec commands are
free to do whatever they like with the index as long as it is left in a
clean state. That keeps the door open for semi-sane use cases, but will
catch unintended index manipulation.
-Peff