Skip to content

Conversation

OneZero-Y
Copy link
Contributor

What type of PR is this?

🐛 Problem

When checking out image files from upstream in WSL/Linux environments, these files incorrectly show as "modified":

  • website/static/img/chat.png
  • website/static/img/dashboard/config.png
  • website/static/img/dashboard/grafana.png
  • website/static/img/dashboard/landing.png
  • website/static/img/dashboard/openwebui.png
  • website/static/img/dashboard/topology.png

Root Cause:

The .gitattributes file has * text=auto and * text eol=lf configured, but doesn't explicitly specify how to handle binary files like images. This causes Git to incorrectly treat PNG images as text files and attempt CRLF → LF line ending conversion, which corrupts the binary file content.

✅ Solution

Add binary attribute declarations for common image formats in .gitattributes:

# Binary files - treat as binary, no line ending conversion
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg binary

📝 Changes

  • Update .gitattributes to add binary attribute for image file types

🎯 Impact

  • ✅ Fixes the issue where image files are incorrectly modified during checkout
  • ✅ Prevents future binary image files from experiencing the same problem
  • ✅ No impact on existing code logic, only changes how Git handles these file types

Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit c952360
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68f1a7fe810201000730510d
😎 Deploy Preview https://deploy-preview-459--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 Root Directory

Owners: @rootfs, @Xunzhuo
Files changed:

  • .gitattributes

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@@ -1,3 +1,11 @@
# Auto detect text files and perform LF normalization
* text=auto
* text eol=lf
Copy link
Contributor

Choose a reason for hiding this comment

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

Test this PR on macOS:

Affected files:

(base) ➜  semantic-router git:(main) ✗ git rm --cached -r -f .
(base) ➜  semantic-router git:(main) ✗ git add .
(base) ➜  semantic-router git:(main) ✗ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   .gitattributes
	modified:   .github/workflows/docker-publish.yml

I tested with my changes on macOS,

# Auto detect text files and perform LF normalization
* text=auto eol=lf

and it got same result.

(base) ➜  semantic-router git:(main) ✗ git diff .github/workflows/docker-publish.yml

output:

image

@rootfs
Copy link
Collaborator

rootfs commented Oct 17, 2025

@yuluo-yx PTAL, thanks

@rootfs rootfs merged commit 49ab206 into vllm-project:main Oct 17, 2025
10 of 11 checks passed
@OneZero-Y OneZero-Y deleted the fix/gitattributes branch October 18, 2025 06:59
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.

5 participants