Skip to content

Conversation

@HNygard
Copy link

@HNygard HNygard commented Jan 24, 2014

Getting an error "is not recognized as an internal or external command" when having multiple excludes in Git Bash in Windows 7. Changing from ' to " will fix the problem in Git Bash.

I have not tested the change in other environments then Git Bash + Windows 7

Before:

$ svn2git --username hallvard -m --authors ../svnauthors --rootistrunk --metadata -v http://svn/repos/url --exclude 'DirectoryA' --exclude 'DirectoryB'
Running command: git svn init --prefix=svn/ --username=hallvard --trunk=http://svn/repos/url
Initialized empty Git repository in c:/git/tmp/merge-test/mainRepo/.git/
Using higher level of URL: http://svn/repos/url => http://svn/repos/SVNRepo
Running command: git config --local svn.authorsfile ../svnauthors
Running command: git svn fetch '--ignore-paths=^(?:)(?:DirectoryA|DirectoryB)'
'DirectoryB)'' is not recognized as an internal or external command,
operable program or batch file.
command failed:
2>&1 git svn fetch '--ignore-paths=^(?:)(?:DirectoryA|DirectoryB)'

After

$ svn2git --username hallvard -m --authors ../svnauthors --rootistrunk --metadata -v http://svn/repos/url --exclude 'DirectoryA' --exclude 'DirectoryB'
Running command: git svn init --prefix=svn/ --username=hallvard --trunk=http://svn/repos/url
Initialized empty Git repository in c:/git/tmp/merge-test/mainRepo/.git/
Using higher level of URL: http://svn/repos/url => http://svn/repos/SVNRepo
Running command: git config --local svn.authorsfile ../svnauthors
(...)

Getting an error "is not recognized as an internal or external command" when having multiple excludes in Git Bash in Windows 7. Changing from ' to " will fix the problem in Git Bash.

I have not tested the change in other environments then Git Bash + Windows 7

Before:
    $ svn2git --username hallvard -m --authors ../svnauthors --rootistrunk --metadata -v http://svn/repos/url --exclude 'DirectoryA' --exclude 'DirectoryB'
    Running command: git svn init --prefix=svn/ --username=hallvard --trunk=http://svn/repos/url
    Initialized empty Git repository in c:/git/tmp/merge-test/mainRepo/.git/
    Using higher level of URL: http://svn/repos/url => http://svn/repos/SVNRepo
    Running command: git config --local svn.authorsfile ../svnauthors
    Running command: git svn fetch '--ignore-paths=^(?:)(?:DirectoryA|DirectoryB)'
    'DirectoryB)'' is not recognized as an internal or external command,
    operable program or batch file.
    command failed:
    2>&1 git svn fetch '--ignore-paths=^(?:)(?:DirectoryA|DirectoryB)'



After
    $ svn2git --username hallvard -m --authors ../svnauthors --rootistrunk --metadata -v http://svn/repos/url --exclude 'DirectoryA' --exclude 'DirectoryB'
    Running command: git svn init --prefix=svn/ --username=hallvard --trunk=http://svn/repos/url
    Initialized empty Git repository in c:/git/tmp/merge-test/mainRepo/.git/
    Using higher level of URL: http://svn/repos/url => http://svn/repos/SVNRepo
    Running command: git config --local svn.authorsfile ../svnauthors
    (...)
@HNygard
Copy link
Author

HNygard commented Jan 27, 2014

This pull request fixes #121. It is the same fix as reported came up with in that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant