Skip to content

chore: Strip noisy metadata from patches

Paul Slaughter requested to merge 45-strip-metadata-from-patches into main

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 specific git 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:

  1. Checkout this MR changes
  2. Run cd vscode to enter the vscode submodule.
  3. Run git reset --hard $(../scripts/dev-vscode-target-sha.sh) to reset your submodule to the base version.
  4. Run ../scripts/dev-apply-patches.sh
  5. Run ../scripts/dev-save-patches.sh
  6. There should be no changes to the patch files 🎉
Edited by Paul Slaughter

Merge request reports

Loading