From 3b4b1a552bc60ab657622f2b5e490548c0394382 Mon Sep 17 00:00:00 2001 From: Ramesh Padmanabhaiah Date: Wed, 24 Jun 2026 19:58:15 -0700 Subject: [PATCH] Tighten git dirty path contracts --- lib/bash/git/README.md | 7 ++++ lib/bash/git/lib_git.sh | 21 ++++++++++-- lib/bash/git/tests/lib_git.bats | 61 +++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 3 deletions(-) diff --git a/lib/bash/git/README.md b/lib/bash/git/README.md index d2dffcd..dd7a2c3 100644 --- a/lib/bash/git/README.md +++ b/lib/bash/git/README.md @@ -41,9 +41,16 @@ log_info "Current branch: $branch" directories return success with an empty result variable. - `git_update_repo` changes into the target repository while it runs because its submodule update sequence depends on repository-relative execution. +- `git_update_repo` only treats an allowed dirty path as safe when every tracked + change stays within that path. Rename records must have both source and + destination inside the allowed path. - `check_script_up_to_date` treats missing git state, untracked scripts, or missing upstreams as skip conditions rather than hard failures. - `check_script_up_to_date