Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Git Move failure when using wildcards #1443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
agirault opened this issue May 20, 2022 · 0 comments
Closed

Git Move failure when using wildcards #1443

agirault opened this issue May 20, 2022 · 0 comments

Comments

@agirault
Copy link

agirault commented May 20, 2022

Hoping to move all files from the foo folder to the current folder (.)

The raw git command looks like this: git mv foo/* .

Using GitPython, those are the two alternatives I could attempt:

repo.index.move(['foo/*', '.']) # -> cmdline: git mv --dry-run foo/* .
repo.git.mv('foo/*', '.') # -> cmdline: git mv foo/* .

They both return the same error:

git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  stderr: 'fatal: bad source, source=foo/*, destination=*'

What is surprising to me is:

  • error says "bad source" but the generated cmdline looks good and actually works when running them in the terminal
  • destination input is . but stderr shows *
@gitpython-developers gitpython-developers locked and limited conversation to collaborators May 21, 2022
@Byron Byron converted this issue into discussion #1445 May 21, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

1 participant