diff options
| author | Mohamed Hegazy <8000722+mhegazy@users.noreply.github.com> | 2026-10-21 16:58:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-21 16:58:27 -0700 |
| commit | 234c3a4a443e3aa79dfe9ac86e931d50fc43e6da (patch) | |
| tree | 032ac8b77aa59a23ce5aa6a456db41256baa1180 /plugins/security-guidance/hooks/diffstate.py | |
| parent | d1adba47161a271799de7b548225d929310046bd (diff) | |
| parent | 2de59fe9d850775f9f516180d144becd4db2c3da (diff) | |
Merge pull request #6837 from anthropics/mhegazy/sg-index-copy-gitlinks
security-guidance: keep nested repositories out of the index copy
Diffstat (limited to 'plugins/security-guidance/hooks/diffstate.py')
| -rw-r--r-- | plugins/security-guidance/hooks/diffstate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/security-guidance/hooks/diffstate.py b/plugins/security-guidance/hooks/diffstate.py index 9ebb2b1b..6532fb6c 100644 --- a/plugins/security-guidance/hooks/diffstate.py +++ b/plugins/security-guidance/hooks/diffstate.py @@ -366,7 +366,8 @@ def capture_git_baseline(cwd): sha = "" # untracked_paths=[]: a plain copy of the index, no `add -N` pass. with _temp_index(cwd, untracked_paths=[]) as env: - # env is None when there is no index file to copy: treat as clean. + # env is None when no usable index copy could be made: fall + # back to HEAD. if env is not None: result = subprocess.run( [*GIT_CMD, "stash", "create"], |
