Skip to content

clean cannot remove paths with long names #2715

@mathstuf

Description

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

Setup

  • 2.27.0.windows.1 64-bit
  • commit 907ab10
$ git --version --build-options

The machine is over a remote connection; copy/pasting back isn't easy.

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Windows 10
  • What options did you set as part of the installation? Or did you choose the
    defaults?

Stock install. Shouldn't matter here though.

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Not that I know of.

Details

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

Git bash

git clean -ffdx
  • What did you expect to occur after running these commands?

Clean directory.

  • What actually happened instead?

It complains that one path name is too long. Git-for-Windows should translate paths to Extended Path representation if this occurs (\\?\).

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

Irrelevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions