Repository navigation
config: add PushRemote() for checking branch.*.pushRemote and remote.pushDefault first - #2715
Merged
Merged
Conversation
…pushDefault first
8 of 9 tasks
chrisd8088
added a commit
to markshep-wbg/git-lfs
that referenced
this pull request
Apr 12, 2026
In a prior commit in this PR we updated the Git LFS locking commands so that they correctly prioritize the Git remote specified with the command-line "--remote" option when a Git "remote.pushDefault" or "branch.<name>.pushRemote" configuration option is also defined and identifies a different Git remote. Previously, our "git lfs lock", "git lfs locks", and "git lfs unlock" commands would incorrectly prioritize a remote specified by the "remote.pushDefault" or "branch.<name>.pushRemote" configuration options over a remote provided as the argument of the "--remote" command-line option. This oversight was first introduced when we added support for the "remote.pushDefault" and "branch.<name>.pushRemote" configuration options in PR git-lfs#2715. The "--remote" option was already supported by our locking commands at that time, as it was part of the original implementation of the commands in PR git-lfs#1256. However, our test suite has apparently never contained any tests which exercise the "--remote" command-line option of our locking commands. We therefore now add tests which check that each of the three locking commands succeeds when an invalid Git remote is specified in either the "remote.pushDefault" or "branch.<name>.pushRemote" configuration options and a valid remote is also provided as the argument of the "--remote" command-line option. Note that all of these new tests would fail without the changes to the locking commands that we made in this PR.
chrisd8088
added a commit
to markshep-wbg/git-lfs
that referenced
this pull request
Apr 12, 2026
In a prior commit in this PR we updated the Git LFS locking commands so that they correctly prioritize the Git remote specified with the command-line "--remote" option when a Git "remote.pushDefault" or "branch.<name>.pushRemote" configuration option is also defined and identifies a different Git remote. Previously, our "git lfs lock", "git lfs locks", and "git lfs unlock" commands would incorrectly prioritize a remote specified by the "remote.pushDefault" or "branch.<name>.pushRemote" configuration options over a remote provided as the argument of the "--remote" command-line option. This oversight was first introduced when we added support for the "remote.pushDefault" and "branch.<name>.pushRemote" configuration options in PR git-lfs#2715. The "--remote" option was already supported by our locking commands at that time, as it was part of the original implementation of the commands in PR git-lfs#1256. However, our test suite has apparently never contained any tests which exercise the "--remote" command-line option of our locking commands. We therefore now add tests which check that each of the three locking commands succeeds when an invalid Git remote is specified in either the "remote.pushDefault" or "branch.<name>.pushRemote" configuration options and a valid remote is also provided as the argument of the "--remote" command-line option. Note that all of these new tests would fail without the changes to the locking commands that we made in this PR.
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.
Fixes #2711