Open
Description
OS: Windows 64 bit
gitpython: 2.0.8
git: 2.10.0
I'm trying to clean my submodules using the command repo.git.submodule('foreach', 'git', 'clean', '-xfd')
. When executing this getting the below stack trace.
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\git\cmd.py", line 466, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 910, in _call_process
return self.execute(make_call(), **_kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 718, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git submodule foreach git clean -xfd' returned with ex
it code 1
stderr: 'C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 311:
0: Bad file descriptor'
Getting the same error for the below commands too,
repo.git.submodule('foreach', 'git', 'reset', '--hard')
repo.git.submodule('foreach', 'git', 'stash')
But the below commands are getting succeeded in gitpython
repo.git.submodule('update', '--init', '--recursive')
repo.git.submodule('update', '--remote', '--recursive')
Whereas trying to execute git submodule foreach git clean -xfd
in windows command prompt or git bash it succeeds without any error.