840d16912a39d1207a2ceb82755f690e15f17e4b — Ori Bernstein 2 years ago fd1cfc8
git/revert: update modification time on revert

when reverting files, 'cp -x' updates the mtime
to the time the file was committed. this prevents
'mk' from rebuilding the file, leading to stale

this change touches the file on revert, so that
we rebuild the file.
1 files changed, 1 insertions(+), 0 deletions(-)

M sys/src/cmd/git/revert
M sys/src/cmd/git/revert => sys/src/cmd/git/revert +1 -0
@@ 16,6 16,7 @@ files=`$nl{cleanname -d $gitrel $* | drop $gitroot}
for(f in `$nl{cd $commit/tree/ && walk -f ./$files}){
	mkdir -p `{basename -d $f}
	cp -x -- $commit/tree/$f $f
	touch $f
	git/add $f
exit ''