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
builds.

this change touches the file on revert, so that
we rebuild the file.
This commit is contained in:
Ori Bernstein 2022-02-27 04:27:56 +00:00
parent fd1cfc824a
commit 840d16912a

View file

@ -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 ''