Skip to content

PoshGit / ugit Compatibility Issues #912

Open
@StartAutomating

Description

@StartAutomating

System Details

  • posh-git version/path: 1.1.0 ~\Documents\PowerShell\Modules\posh-git\1.1.0
  • PowerShell version: 7.2.5
  • git version 2.35.1.windows.2
  • OS: Microsoft Windows NT 10.0.22000.0

Issue Description

posh-git has a compatibility issue with ugit.

This is because ugit overrides git with a PowerShell command.

While this does support any number of arguments, PowerShell can get confused when dealing with short argument names.

Thus line 331 in Get-GitStatus blows up the prompt.

The solution for this works just fine if ugit is loaded or not.

Quote the single character arguments:

git --no-optional-locks '-c' core.quotepath=false '-c' color.status=false status $untrackedFilesOption --short --branch 2>$null

Since posh-git is already very useful, but doesn't return git naturally as objects, it makes sense for both modules to work together in concert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions