Skip to content

config: add PushRemote() for checking branch.*.pushRemote and remote.pushDefault first - #2715

Merged
technoweenie merged 1 commit into
masterfrom
config-pushRemote
Nov 3, 2017
Merged

technoweenie merged 1 commit into
masterfrom
config-pushRemote

Conversation

@technoweenie

Copy link
Copy Markdown
Contributor

Fixes #2711

@technoweenie technoweenie mentioned this pull request Nov 3, 2017
8 of 9 tasks
@technoweenie technoweenie added this to the v2.4.0 milestone Nov 3, 2017
@technoweenie
technoweenie merged commit ac19b5e into master Nov 3, 2017
@technoweenie
technoweenie deleted the config-pushRemote branch November 3, 2017 17:06
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.
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.

1 participant