chore: Strip noisy metadata from patches
Issue: Strip metadata from patches in `dev-save-patches` (#45 - closed)
Description
Closes Strip metadata from patches in `dev-save-patches` (#45 - closed) by:
- Stripping out the top-line metadata which is mostly arbitrary except the commit message.
- Setting
--no-signature
so that the environment specificgit
version isn't written to the patch.
This MR also:
- Adds a small check to warn the user if they ran
dev-save-patches.sh
on an empty changeset. - Changes how we handle the
$patches_dir_backup
. Instead of creating a backup and working off of the$patches_dir
, we create a.tmp
directory and work off that. We finally move it all over to$patches_dir
if things are good.
How to test?
Locally:
- Checkout this MR changes
- Run
cd vscode
to enter thevscode
submodule. - Run
git reset --hard $(../scripts/dev-vscode-target-sha.sh)
to reset your submodule to the base version. - Run
../scripts/dev-apply-patches.sh
- Run
../scripts/dev-save-patches.sh
- There should be no changes to the patch files
🎉
Edited by Paul Slaughter