2 Commits

Author SHA1 Message Date
Nicholas Ferguson 1c512579a2 fix(git): clear stale index.lock at unstage step under --force
The lock-retry path only fired after the commit step failed, but a
stale .git/index.lock blocks the unstage step (the first index-touching
operation in both git_commit and git_patch). The retry was unreachable.

Extract _clear_stale_lock_from_error helper and extend _unstage_all to
honor force_lock so 'cortex git commit --force' actually clears stale
locks as advertised. Default behavior (force_lock=False) is unchanged
— locks are preserved so callers who don't opt in can still investigate.
2026-04-30 19:23:10 -04:00
Nicholas Ferguson d078881d02 feat(git): add git operations package with safe commit, patch, push, stash, branch 2026-03-24 03:46:38 -04:00