author | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Jan 2010 01:10:35 +0000 (17:10 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 20 Jan 2010 01:10:35 +0000 (17:10 -0800) | ||
commit | ab6854515ee2280f187fbc2ab08f9e9115438f3e | |
tree | d1bcf567557cb622bde89663fe3f386bcf2e911f | tree | snapshot |
parent | 6329bade6632a9df4b37dd3a7f8d641eed74bbf5 | commit | diff |
status: don't require the repository to be writable
We need to update the index before hooks run when actually making a
commit, but we shouldn't have to write the index when running "status".
If we can, then we have already spent cycles to refresh the index and
it is a waste not to write it out, but it is not a disaster if we cannot
write it out. The main reason the user is running "git status" is to get
the "status", and refreshing the index is a mere side effect that we can
do without.
Discovery and initial attempted fix by Dscho.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We need to update the index before hooks run when actually making a
commit, but we shouldn't have to write the index when running "status".
If we can, then we have already spent cycles to refresh the index and
it is a waste not to write it out, but it is not a disaster if we cannot
write it out. The main reason the user is running "git status" is to get
the "status", and refreshing the index is a mere side effect that we can
do without.
Discovery and initial attempted fix by Dscho.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | diff | blob | history |