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

tab for "git push --force-with-lease" did not work #621

Closed
chucklu opened this issue Sep 11, 2018 · 2 comments
Closed

tab for "git push --force-with-lease" did not work #621

chucklu opened this issue Sep 11, 2018 · 2 comments

Comments

@chucklu
Copy link
Contributor

chucklu commented Sep 11, 2018

System Details

  • posh-git version/path:
    SHA-1: 836ec8c
  • PowerShell version:
Name                           Value
----                           -----
PSVersion                      6.1.0-rc.1
PSEdition                      Core
GitCommitId                    6.1.0-rc.1
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
  • Git version:
    git version 2.18.0.windows.1
  • Operating system name and version:
    OS Microsoft Windows 10.0.16299

Issue Description

When I input "git push --force-" then tab, I got "git push --force-with-lease=".
The last character "=" make the command failed, after I remove "=", it works.
I have tried to search the "--force-with-lease" in this repository, I find this test case:

$result -contains '--force-with-lease=' | Should Be $true

some other commands end with "=" was found, I am not sure if they worked or not

$result -contains '--exec=' | Should Be $true
$result -contains '--receive-pack=' | Should Be $true
$result -contains '--recurse-submodules=' | Should Be $true
$result -contains '--repo=' | Should Be $true
$result = & $module GitTabExpansionInternal 'git push --recurse-submodules='

@dahlbyk
Copy link
Owner

dahlbyk commented Sep 11, 2018

If you have time, please submit a PR to remove the optional = from test and code. There may be other instances of = on parameters where it's really optional, too.

There are some parameters (e.g. git merge --strategy=ours) where the value is required, so we can't just strip all of them. For the most part our parameter lists were copied from git-completion.bash, which apparently handles the optional = differently for some commands?

@chucklu
Copy link
Contributor Author

chucklu commented Sep 12, 2018

Hi @dahlbyk ,
I have a pull request to fix this issue, please verify it.

@chucklu chucklu closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants