Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

plumbing: format/gitattributes, close file in ReadAttributesFile#1018

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@prskr
Copy link
Contributor

gitattributes.ReadAttributesFile(...) currently doesn't close the successfully opened file causing troubles especially on Windows systems.

This PR fixes this issue.

Furthermore I added a tiny optimisation to not read the.gitattributes file completely to memory before processing it but to use abufio.Scanner to process it line by line.

See issue#1017

@prskrprskr changed the titlefix: close file in ReadAttributesFileplumbing: format/gitattributes, close file in ReadAttributesFileFeb 2, 2024
@pjbgf
Copy link
Member

@prskr thanks for the fix. Please change the commit message so it passes the PR Validation - the title of this PR should suffice.

Otherwise, LGTM.

@prskrprskrforce-pushed the1017-readattributes-does-not-close-file branch from690f657 to798d994CompareFebruary 5, 2024 09:30
@prskr
Copy link
ContributorAuthor

@pjbgf thanks for the feedback!

Sorry for the inconvenience, I only noticed the commit convention in the contributing guide after I already created the PR and figured I'd update it today 🙈

@pjbgfpjbgf merged commitd9b0a0d intogo-git:masterFeb 5, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pjbgfpjbgfpjbgf approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@prskr@pjbgf

[8]ページ先頭

©2009-2025 Movatter.jp