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 git lfs glob pattern #23

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Fix git lfs glob pattern #23

merged 2 commits into from
Aug 8, 2024

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Aug 6, 2024

I had quite some trouble getting git lfs running locally, which came down to two problems:

  • LFS was using SSH auth instead of HTTPS auth for some reason. I fixed that by registering my SSH key, and properly setting up SSO for it. Nothing major, just an annoyance. Nevertheless, I removed the explicit .lfsconfig, as git should inherit those urls from the primary remote.

  • For some reason, I ended up in this weird state where LFS would properly resolve files, but then git itself was confused and considered those files to be modified and staged for commit. This prevented me from pulling and switching branches because "you have uncommited changes". Doing the commit as git suggested would indeed actually commit the files, and not go through the git filter. No idea whats happening here, but looks like git and lfs disagree on how to interpret the glob patterns in the .gitattributes, so I made those more explicit, and now both agree and git will not flag those files as "ready for commit" anymore.


Please try these changes locally to see if they work correctly with sapling.

I had quite some trouble getting git lfs running locally, which came down to two problems:

- LFS was using SSH auth instead of HTTPS auth for some reason. I fixed that by registering my SSH key, and properly setting up SSO for it. Nothing major, just an annoyance. Nevertheless, I removed the explicit `.lfsconfig`, as git should inherit those urls from the primary remote.

- For some reason, I ended up in this weird state where LFS would properly resolve files, but then git itself was confused and considered those files to be modified and staged for commit. This prevented me from pulling and switching branches because "you have uncommited changes". Doing the commit as git suggested would indeed actually commit the files, and not go through the git filter. No idea whats happening here, but looks like git and lfs disagree on how to interpret the glob patterns in the `.gitattributes`, so I made those more explicit, and now both agree and git will not flag those files as "ready for commit" anymore.
@Swatinem Swatinem self-assigned this Aug 6, 2024
Copy link

codecov bot commented Aug 6, 2024

The author of this PR, Swatinem, is not an activated member of this organization on Codecov.
Please activate this user on Codecov to display this PR comment.
Coverage data is still being uploaded to Codecov.io for purposes of overall coverage calculations.
Please don't hesitate to email us at support@codecov.io with any questions.

Copy link
Collaborator

@matt-codecov matt-codecov left a comment

Choose a reason for hiding this comment

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

the .lfsconfig was there bc git lfs doesn't know to parse the remote from sapling instead of git so i had to tell it the url

@Swatinem Swatinem changed the title Fix git lfs config Fix git lfs glob pattern Aug 7, 2024
@matt-codecov matt-codecov merged commit 383fa01 into main Aug 8, 2024
7 checks passed
@matt-codecov matt-codecov deleted the swatinem/fix-lfs branch August 8, 2024 23:11
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.

2 participants