Skip to content

fix(s3): commit identical S3 versions and isolate git config#82

Merged
torbjokv merged 1 commit into
mainfrom
NP-51317-fix-s3-versions
Jun 11, 2026
Merged

fix(s3): commit identical S3 versions and isolate git config#82
torbjokv merged 1 commit into
mainfrom
NP-51317-fix-s3-versions

Conversation

@torbjokv

Copy link
Copy Markdown
Contributor

Fixes a bug in s3 get-versions where byte-identical consecutive S3 object versions were silently dropped from the generated git history, and hardens the git invocation.

  • Use git commit --allow-empty so byte-identical consecutive S3 versions still produce a commit, keeping a 1:1 version-to-commit mapping
  • Isolate the generated git history from the user's global/system git config (GIT_CONFIG_GLOBAL/GIT_CONFIG_SYSTEM=/dev/null) so templates, hooks, signing and includeIf don't leak in
  • Improve git error messages with exit code, the failing command and working dir (falls back to stdout / (no output))
  • Add test covering identical-version commits

https://sikt.atlassian.net/browse/NP-51317

- Use --allow-empty so byte-identical consecutive S3 versions still
  produce a commit, keeping a 1:1 version-to-commit mapping
- Isolate generated git history from user's global/system git config
  (GIT_CONFIG_GLOBAL/SYSTEM=/dev/null)
- Improve git error messages with exit code, command and working dir
@torbjokv torbjokv requested a review from LarsV123 June 11, 2026 10:43
@torbjokv torbjokv merged commit 732385a into main Jun 11, 2026
4 checks passed
@torbjokv torbjokv deleted the NP-51317-fix-s3-versions branch June 11, 2026 10:58
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.

2 participants