From: Michael Lohmann Date: Mon, 13 Oct 2025 21:46:03 GMT Subject: [PATCH v2 0/5] Apply comments of D. Ben Knoble Message-ID: <20251013214608.33581-1-git@lohmann.sh> In-Reply-To: Thanks! Michael Lohmann (5): setup: rename `ensure_safe_repository()` for clarity setup: rename `die_upon_assumed_unsafe_repo()` to align with check setup: refactor `ensure_safe_repository()` testing priorities setup: allow temporary bypass of `ensure_safe_repository()` checks setup: allow not marking self owned repos as safe in `ensure_safe_repository()` Documentation/config/safe.adoc | 9 ++++ Documentation/git.adoc | 25 +++++++++++ builtin/clone.c | 2 +- environment.h | 2 + git.c | 9 ++++ path.c | 4 +- setup.c | 45 ++++++++++++++------ setup.h | 2 +- t/meson.build | 1 + t/t0036-allow-unsafe-directory.sh | 70 +++++++++++++++++++++++++++++++ 10 files changed, 153 insertions(+), 16 deletions(-) create mode 100755 t/t0036-allow-unsafe-directory.sh Range-diff against v1: 1: 3f8805eb96 = 1: 3f8805eb96 setup: rename `ensure_safe_repository()` for clarity 2: aa09159dec = 2: aa09159dec setup: rename `die_upon_assumed_unsafe_repo()` to align with check 3: ad4f64fdb8 = 3: ad4f64fdb8 setup: refactor `ensure_safe_repository()` testing priorities 4: db31fdef4e = 4: db31fdef4e setup: allow temporary bypass of `ensure_safe_repository()` checks 5: f65fd1c4fa ! 5: 6f710af1da setup: allow not marking self owned repos as safe in `ensure_safe_repository()` @@ Documentation/config/safe.adoc: which id the original user has. +safe.assumeUnsafe:: + Boolean to indicate that the ownership of a repository should not + be taken into account when checking if the repository is safe. It -+ will prevent against accidental arbitrariy code execution ++ will prevent against accidental arbitrary code execution. ++ +To temporarily allow git execution in case of an assumed unsafe repository, +run the command with `--allow-unsafe`. To permanently trust this path, add @@ Documentation/git.adoc: If you just want to run git as if it was started in `