Skip to content

Perl: Git.pm cannot handle arguments with spaces #1602

@ColMelvin

Description

@ColMelvin
  • 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 for Windows v2.10.2 32-bit
C:\>git --version --build-options
git version 2.10.2.windows.1
sizeof-long: 4
machine: x86
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 8.1 64-bit
C:\>cmd /c ver

Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
    IIRC, mostly the defaults, but I selected to add git.exe (but not the commands themselves) to the PATH.
C:\>type "C:\Program Files (x86)\Git\etc\install-options.txt"
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

None I can think of

Details

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

CMD

C:\example>perl -MGit -e "$f = q{directory with spaces}; mkdir $f; Git::command(q{init}, $f)"
  • What did you expect to occur after running these commands?

Directory is created and repository is initialized.

  • What actually happened instead?
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]
init directory with spaces: command returned error: 129

It seems the code never accounted for spaces in the first place, as the FIXME will attest.

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

N/A

  • Workaround

Run in git-bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions