git mtime updates skip non-existant paths

This commit is contained in:
Lance Vick 2023-10-10 15:18:24 -07:00
parent 9a968c87c8
commit b33b2a98ac
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,8 @@ toolchain-restore-mtime:
mkdir -p "$$d"; \
done; \
for f in $$(git ls-tree -r -t --full-name --name-only "HEAD"); do \
touch -t \
( test -f "$$f" || test -d "$$f" ) \
&& touch -t \
$$(git log \
--pretty=format:%cd \
--date=format:%Y%m%d%H%M.%S \