-
-
Notifications
You must be signed in to change notification settings - Fork 954
-
Doing
image
repo.remotes.origin.fetch(['--prune', '--prune-tags'])
works well until 3.1.29 version, but when updating to 3.1.30 or 3.1.31 fetch command stops working because it tries to take the parameter --prune as a remote
cmdline: git fetch -v -- origin --prune --prune-tags
stderr: 'fatal: couldn't find remote ref --prune'
Thanks for reviewing this
Beta Was this translation helpful? Give feedback.
All reactions
This is a feature to prevent command injection when passing options. I think there are workarounds too, but don't know what exactly it is.
You could try .fetch(prune=True, prune_tags=True)
which should be except from injection projection, or try to set .fetch(..., allow_unsafe_options=True
)`.
Hope that helps.
Replies: 2 comments
-
This is a feature to prevent command injection when passing options. I think there are workarounds too, but don't know what exactly it is.
You could try .fetch(prune=True, prune_tags=True)
which should be except from injection projection, or try to set .fetch(..., allow_unsafe_options=True
)`.
Hope that helps.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello,
Sorry for the late answer. That worked fine. Thanks a lot !
image
Beta Was this translation helpful? Give feedback.