Capture git diff when building#3415
Open
bendudson wants to merge 1 commit into
Open
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (
conductionexample). GPT-5.4 wrote most of the code; I reviewed and modified slightly.Fixes #2217