From 692e74e329f1478edd5855f70f5ceb5af34e4a12 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Sun, 19 Sep 2021 17:42:22 +0100 Subject: [PATCH] hooks/post-merge: Skip time updates for directories This will erroneously lead to synchronization for the entire tree. --- hooks/post-merge | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks/post-merge b/hooks/post-merge index a760cf4..9e8ea1e 100755 --- a/hooks/post-merge +++ b/hooks/post-merge @@ -38,6 +38,11 @@ function sync-coreos-config() { # Update timestamp for temporary file to match last commit time, in order to ensure # correct partial updates. for f in "$dir/"**; do + # Skip directories, as updating their commit times will have all files within be synchronized. + if test -d "$f"; then + continue + fi + touch --date="$(git -C "$TEMP_CONFIG_PATH" log -n 1 --pretty=format:%cd --date=iso --date-order -- "$f")" -- "$f" done