fix(docker): mark all repo as safe for git when running in container

whitelisting only PX4 source directory made git commands
fail when executed on the submodules

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
This commit is contained in:
Beniamino Pozzan
2026-09-15 19:34:36 +01:00
committed by Ramon Roche
parent 2fc441493e
commit 9300113ada

View File

@@ -140,7 +140,7 @@ GIT_COMMON_DIR=$(git rev-parse --path-format=absolute --git-common-dir)
docker run --rm -it \
-v "$SOURCE:$SOURCE" -v "$GIT_COMMON_DIR:$GIT_COMMON_DIR" -w "$SOURCE" \
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory \
-e "GIT_CONFIG_VALUE_0=$SOURCE" px4-dev-ros2:local bash
-e "GIT_CONFIG_VALUE_0=*" px4-dev-ros2:local bash
```
The same absolute mounts support both ordinary checkouts and git worktrees.