Repository navigation
lfs/attribute.go: remove default value from upgradeables - #2994
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 teaches
git lfs installnot to treat the current, installed values of an "attribute" as upgrade-able, and therefore avoids writing over a.gitconfigtime at each invocation ofgit lfs install.As @niik points out in #2993, users of GitHub Desktop were noticing that their
~/.gitconfigfiles were being written to every time that GitHub Desktop launched, but the contents of the file was left unchanged.So, Git LFS treats the currently-installed (and up-to-date) value of both
filter.lfs.smudgeandfilter.lfs.processas "upgradeable" and therefore needing to be upgraded to their same value.This commit teaches Git LFS to no longer treat the current value of an attribute as upgradeable. If in the future, any of these values need to be changed, they may simply be added to the list of upgradeables without issue.
While I was here, I gave the
install againtest some ❤️. There were a few things I noticed:printf | grepanti-pattern. This breaks for strings that contain format verbs (like %f), and can be substituted for[ "expected" = "$ACTUAL" ].git lfs installdoes not work outside of a repository without--skip-repo. This is desireable, but was behind a|, (withoutset -o pipefail, or checking${PIPESTATUS[0]}) so wasn't being caught.--replace-alldoesn't show up in theGIT_TRACE=1'd output ofgit lfs install.Closes: #2993.
/cc @git-lfs/core @niik