Skip to content

Conversation

@akramcodez
Copy link

Description

The addCoAuthorToGitCommit function failed to inject co-author attribution for unquoted commit messages like git commit -m Fix_bug, causing the feature to be silently skipped.

Solution

  • Updated regex pattern to match both quoted (-m "msg") and unquoted (-m msg) formats
  • Unquoted messages are wrapped in double quotes when co-author is added
  • Behavior matches shell conventions (captures single word only)

Changes

  • packages/core/src/tools/shell.ts: Enhanced regex + handling logic
  • packages/core/src/tools/shell.test.ts: Added test for unquoted messages

Testing

git commit -m Fix_bug_unquoted  # Now works ✓
git commit -m "Quoted message"  # Still works ✓

fixes #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git Co-Author Injection Fails for Unquoted Commit Messages

1 participant