[PR #611] fix: handle UTF-8 BOM in Cursor hook input #611

Closed
opened 2026-03-02 04:14:06 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/611

State: closed
Merged: Yes


Summary

  • strip a leading UTF-8 BOM from --hook-input values before preset parsing
  • apply BOM stripping to both direct --hook-input <json> and --hook-input stdin paths
  • add a Cursor regression test covering BOM-prefixed stdin hook payloads

Testing

  • cargo test --test cursor test_cursor_checkpoint_stdin_with_utf8_bom -- --nocapture

Refs #604


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/611 **State:** closed **Merged:** Yes --- ## Summary - strip a leading UTF-8 BOM from `--hook-input` values before preset parsing - apply BOM stripping to both direct `--hook-input <json>` and `--hook-input stdin` paths - add a Cursor regression test covering BOM-prefixed stdin hook payloads ## Testing - cargo test --test cursor test_cursor_checkpoint_stdin_with_utf8_bom -- --nocapture Refs #604 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/611" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:14:06 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#611
No description provided.