Skip to content

Only add safe.directory to git global config in CI and Docker contexts#2152

Merged
Drarig29 merged 3 commits into
masterfrom
corentin.girard/fix-local-safe-directory
Mar 11, 2026
Merged

Only add safe.directory to git global config in CI and Docker contexts#2152
Drarig29 merged 3 commits into
masterfrom
corentin.girard/fix-local-safe-directory

Conversation

@Drarig29
Copy link
Copy Markdown
Contributor

@Drarig29 Drarig29 commented Mar 6, 2026

What and why?

Personal laptops were having their global git config modified on every yarn test and normal runs. The safe.directory workaround is only needed when the repo is checked out by a different user (Docker volume mounts, CI envs).

Related:

How?

Only add cwd to safe directories in Docker and CI contexts.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

…ntexts

Personal laptops were having their global git config modified on every
`yarn test` run. The safe.directory workaround is only needed when the
repo is checked out by a different user (Docker volume mounts, CI envs).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Drarig29 Drarig29 added the datadog-ci For PRs spanning multiple commands, and repo-wide changes label Mar 6, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Drarig29 Drarig29 marked this pull request as ready for review March 6, 2026 16:35
@Drarig29 Drarig29 requested review from a team as code owners March 6, 2026 16:35
Comment thread packages/base/src/commands/git-metadata/git.ts Outdated
@Drarig29 Drarig29 removed the request for review from rpelliard March 10, 2026 16:50
@Drarig29 Drarig29 merged commit b9d97e6 into master Mar 11, 2026
26 checks passed
@Drarig29 Drarig29 deleted the corentin.girard/fix-local-safe-directory branch March 11, 2026 09:37
@Drarig29 Drarig29 mentioned this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datadog-ci For PRs spanning multiple commands, and repo-wide changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants