Skip to content

chore: improve .gitattributes for cross-platform consistency#2523

Open
TranscendenceLiang wants to merge 1 commit intoagentscope-ai:mainfrom
TranscendenceLiang:chore/improve-gitattributes
Open

chore: improve .gitattributes for cross-platform consistency#2523
TranscendenceLiang wants to merge 1 commit intoagentscope-ai:mainfrom
TranscendenceLiang:chore/improve-gitattributes

Conversation

@TranscendenceLiang
Copy link
Copy Markdown

  • Add text=auto for automatic text file detection
  • Set explicit line endings for Python (LF), Shell (LF), Batch (CRLF)
  • Mark binary files (images, fonts, archives) to prevent corruption
  • Exclude third-party directories from diff computation

Description

[Describe what this PR does and why]

Related Issue: Fixes #(issue_number) or Relates to #(issue_number)

Security Considerations: [If applicable, e.g. channel auth, env/config handling]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Core / Backend (app, agents, config, providers, utils, local_models)
  • Console (frontend web UI)
  • Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
  • Skills
  • CLI
  • Documentation (website)
  • Tests
  • CI/CD
  • Scripts / Deploy

Checklist

  • I ran pre-commit run --all-files locally and it passes
  • If pre-commit auto-fixed files, I committed those changes and reran checks
  • I ran tests locally (pytest or as relevant) and they pass
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Local Verification Evidence

pre-commit run --all-files
# paste summary result

pytest
# paste summary result

Additional Notes

[Optional: any other context]

@github-actions
Copy link
Copy Markdown

Welcome to CoPaw! 🐾

Hi @TranscendenceLiang, this is your 4th Pull Request.

🙌 Join Developer Community

Thanks so much for your contribution! We'd love to invite you to join the official CoPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page:
https://copaw.agentscope.io/docs/community

We truly appreciate your enthusiasm—and look forward to your future contributions! 😊

We'll review your PR soon.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .gitattributes file to include comprehensive rules for line endings, binary file definitions, and exclusions for generated directories. The changes establish LF as the standard for shell scripts, Python, and web-related files while maintaining CRLF for Windows batch files. A review comment suggests further extending these rules to include other common text-based formats like JSON, Markdown, and YAML to ensure consistent behavior across all developer environments.

@TranscendenceLiang TranscendenceLiang force-pushed the chore/improve-gitattributes branch from 39063ce to 2dd08a8 Compare March 30, 2026 08:19
- Add text=auto for automatic text file detection
- Set explicit line endings for Python (LF), Shell (LF), Batch (CRLF)
- Mark binary files (images, fonts, archives) to prevent corruption
- Exclude third-party directories from diff computation
@TranscendenceLiang TranscendenceLiang force-pushed the chore/improve-gitattributes branch from 2dd08a8 to b719dac Compare March 30, 2026 08:58
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.

1 participant