fix: respect git add option terminator

This commit is contained in:
Colin
2026-05-25 10:19:54 -04:00
parent 643efb1d76
commit 3002bd73e0
2 changed files with 15 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ function forceGitAddCwds(command, defaultCwd) {
if (tokens[j] !== 'add') continue;
for (let k = j + 1; k < tokens.length && !separators.has(tokens[k]); k++) {
if (tokens[k] === '--') break;
if (tokens[k] === '--force' || tokens[k] === '-f' || /^-[A-Za-z]*f[A-Za-z]*$/.test(tokens[k])) {
cwdList.push(gitCwd);
break;