Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lockable attribute problem #5556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

exceed-alae
Copy link
Contributor

Problem

lockable attribute in .gitattributes located on sub-directory could not be enabled.

Steps for reproduce

See test repo.

Details of fix

Add **/ to internal path pattern in .gitattributes located on sub-directory if path has no slash or only tail slash.

@exceed-alae exceed-alae requested a review from a team as a code owner October 26, 2023 00:51
@bk2204
Copy link
Member

bk2204 commented Oct 26, 2023

Hmmm, I see the problem with your reproduction steps, but I don't think this is the correct solution. First of all, it fails tests. Second of all, I think the better way to handle this would be stripping off the .gitattributes directory prefix in the filepathfilter code and then matching the pattern against the stripped string.

@CIFTum
Copy link

CIFTum commented Dec 5, 2023

เมื่อคุณต้องการแก้ไขปัญหาแอตทริบิวต์ที่ล็อคได้ใน Git คุณต้องทำการแก้ไขไฟล์ .gitattributes ที่อยู่ในไดเรกทอรีหลักของโปรเจ็กต์ ไม่ใช่ไฟล์ .gitattributes ที่อยู่ในไดเรกทอรีย่อย เพราะ Git จะใช้การตั้งค่าแอตทริบิวต์จากไฟล์ .gitattributes ที่อยู่ในไดเรกทอรีหลักเท่านั้น ดังนั้น คุณต้องย้ายหรือลบไฟล์ .gitattributes ที่อยู่ในไดเรกทอรีย่อย และแก้ไขการตั้งค่าแอตทริบิวต์ในไฟล์ .gitattributes ที่อยู่ในไดเรกทอรีหลัก

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.

None yet

3 participants