Skip to content

Capture git diff when building#3415

Open
bendudson wants to merge 1 commit into
nextfrom
capture-git-diff
Open

Capture git diff when building#3415
bendudson wants to merge 1 commit into
nextfrom
capture-git-diff

Conversation

@bendudson

Copy link
Copy Markdown
Contributor

Stores code changes from the current commit into the output dump files. This is to help in reproducing results when code was not committed before building.

  • Generates a git diff on build, so the diff used when compiling is stored, not the diff when configuring. Handles out-of-source builds and cases where the source is not under git e.g. release tarballs.

  • Stores the diff as a string in a compilation unit git_metadata.cxx

  • Saves to output, along with flags indicating whether the diff was available, and whether the build had uncommitted changes.

Not sure how to test this in CI, so I just verified manually that changes in source get stored in the output files (conduction example). GPT-5.4 wrote most of the code; I reviewed and modified slightly.

Fixes #2217

- Generates a git diff on build, so the diff used when compiling
  is stored, not the diff when configuring. Handles out-of-source
  builds and cases where the source is not under git e.g. release
  tarballs.

- Stores the diff as a string in a compilation unit git_metadata.cxx

- Saves to output, along with flags indicating whether the diff
  was available, and whether the build had uncommitted changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save git diff?

1 participant