Code

do not overwrite files marked "assume unchanged"
authorClemens Buchacher <drizzd@aon.at>
Sat, 1 May 2010 09:25:12 +0000 (11:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 1 May 2010 19:00:44 +0000 (12:00 -0700)
commitaecda37c66ecf215fc67b0b48998a8c69c10d5a5
tree407e3028610895da47c16d6c29c0cc72b1385524
parente92e9cd3c388544f4f521736df844b37908c3879
do not overwrite files marked "assume unchanged"

A merge will fail gracefully if it needs to update files marked
"assume unchanged", but other similar commands will not. In
particular, checkout and rebase will silently overwrite changes to
such files.

This is a regression introduced in commit 1dcafcc0 (verify_uptodate():
add ce_uptodate(ce) test), which avoids lstat's during a merge, if the
index entry is up-to-date. If the CE_VALID flag is set, however, we
cannot trust CE_UPTODATE.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t2106-update-index-assume-unchanged.sh [new file with mode: 0755]
unpack-trees.c