Summary
__base_bash_libs_git_only_path_dirty__ (lib/bash/git/lib_git.sh:198-238) calls bare git status, relying on the caller having already cd'd/pushd'd into the target repo — unlike every other function in this module, which explicitly threads -C "$repo_dir" through its git invocations to stay cwd-independent.
Details
Every other public and internal function in lib_git.sh accepts or threads a repo directory explicitly and passes -C "$repo_dir" to git. This one helper is the exception, which means it silently depends on caller cwd state that the rest of the module is careful to avoid depending on.
Impact
A caller that uses this helper (directly or transitively) from a different cwd than the target repo gets wrong or empty results without any error — inconsistent with the cwd-independence the rest of the module guarantees, and a likely source of confusing bugs for anyone who assumes uniform behavior across lib_git.sh.
Suggested fix
Thread -C "$repo_dir" (or equivalent) through this helper's git status call to match the rest of the module.
Summary
__base_bash_libs_git_only_path_dirty__(lib/bash/git/lib_git.sh:198-238) calls baregit status, relying on the caller having alreadycd'd/pushd'd into the target repo — unlike every other function in this module, which explicitly threads-C "$repo_dir"through itsgitinvocations to stay cwd-independent.Details
Every other public and internal function in
lib_git.shaccepts or threads a repo directory explicitly and passes-C "$repo_dir"togit. This one helper is the exception, which means it silently depends on caller cwd state that the rest of the module is careful to avoid depending on.Impact
A caller that uses this helper (directly or transitively) from a different cwd than the target repo gets wrong or empty results without any error — inconsistent with the cwd-independence the rest of the module guarantees, and a likely source of confusing bugs for anyone who assumes uniform behavior across
lib_git.sh.Suggested fix
Thread
-C "$repo_dir"(or equivalent) through this helper'sgit statuscall to match the rest of the module.