Repository navigation
*: use patched version of bgetnry/go-netrc - #3027
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates our copy of package
github.com/bgentry/go-netrcto allow netrc files containing unknown keywords, fixing desktop/desktop#4745.Here's some background: the latest version of the Heroku CLI uses non-standard keywords in the user's netrc file. The parser we had used previously is strict and has caused confusing errors such as those experienced in: #2943, #2624, #2543, & #1998.
So, broken netrc files would not be parsed by Git LFS: that's OK, since which credentials to authenticate with on non-parseable netrc files is undefined.
However, Heroku CLI intentionally adds non-standard keywords to netrc files. The trouble is that that tool knows how to interpret them, and we don't. In other words, we can't distinguish between netrc files using the Heroku CLI and broken ones.
Instead, let's loosen the netrc parsing requirements by applying a patch (see: git-lfs/go-netrc@5affb93432) that round-trips unknown keywords. Since we vendored an external package, we must first fork it (see: https://github.com/git-lfs/go-netrc) and then apply our patch on top.
Therefore, the main interesting bits aren't in this PR, rather a bunch of changes like
s/bgentry/git-lfs/g, and an extra test intest/test-credentials.shto ensure that netrc files with unknown keywords are parsed without error./cc @git-lfs/core desktop/desktop#4745