Skip to content

rev-parse drive casing no longer dependent on cwd input #2478

Closed
@eamodio

Description

@eamodio
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.25.0.windows.1
cpu: x86_64
built from commit: 7c71c859c97853ed057da5cbab12f3c13b5554df
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19041.21]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY       
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled    
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

CMD (shelled out via execFile in node.js)

git rev-parse --show-toplevel

I am shelling out to git via execFile in node.js to run this command. And I am passing a cwd path like c:/Users/Eric/code/eamodio/vscode-gitlens. Prior to Git v2.25, the return of the command would be c:/Users/Eric/code/eamodio/vscode-gitlens (since that is the root folder of the repo). But in v2.25 the return is C:/Users/Eric/code/eamodio/vscode-gitlens note the capital C.

This is not reproducible on the command line. As it seems that on the command line you always get C:/Users/Eric/code/eamodio/vscode-gitlens.

So prior to v2.25, the toplevel path returned seemed to be dependent on the incoming cwd, where as in v2.25 it is not.

  • What did you expect to occur after running these commands?

Expected the same behavior as prior to v2.25

  • What actually happened instead?

Prior to v2.25, the toplevel path returned seemed to be dependent on the incoming cwd, where as in v2.25 it is not.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

https://github.com/eamodio/vscode-gitlens

I only noticed this behavior change, because once upgrading to Git v2.25 GitLens in VS Code broke and I tried to track down what the difference was.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions