intel_sync_upstream: Avoid unintended file deletions during commits.

This commit adds a preventative measure to avoid the unintended removal
of essential files like OWNER and DIR_METADATA. The code now includes a
check that verifies if these files have been deleted, and if so, it
automatically restores them to their original state.

BUG=none
TEST=`intel_sync_upstream.sh ptl fsp 'PTL.3015.00' 1234567` and
ensured that the required files are restored. performed similar checks
for edk2 and edk2-platform.

Change-Id: I607a541445583e46067f0c2b167fb073887d0da8
Signed-off-by: Jayvik Desai <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/6367899
Reviewed-by: Nick Vaccaro <[email protected]>
Commit-Queue: ChromeOS Auto Runner <[email protected]>
Reviewed-by: Kapil Porwal <[email protected]>
Commit-Queue: Kapil Porwal <[email protected]>
1 file changed