diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-12-22 17:08:42 +0100 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-12-22 17:08:42 +0100 |
commit | 787359d80d80225095567340aa5e7ec01847fa9a (patch) | |
tree | 41947c5be7875e746b6e1452add2b92283e926b4 /git/remote.py | |
parent | 17ff2630af26b37f82ac1158ee3495c4390da699 (diff) | |
parent | 2aae532a3993a100d5074cde70abe548cfc45861 (diff) | |
download | gitpython-787359d80d80225095567340aa5e7ec01847fa9a.tar.gz |
Merge branch 'fix-cmd-injection'
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py index 7b44020c..483d536a 100644 --- a/git/remote.py +++ b/git/remote.py @@ -964,7 +964,7 @@ class Remote(LazyMixin, IterableObj): args = [refspec] proc = self.repo.git.fetch( - self, *args, as_process=True, with_stdout=False, universal_newlines=True, v=verbose, **kwargs + "--", self, *args, as_process=True, with_stdout=False, universal_newlines=True, v=verbose, **kwargs ) res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout) if hasattr(self.repo.odb, "update_cache"): @@ -991,7 +991,7 @@ class Remote(LazyMixin, IterableObj): self._assert_refspec() kwargs = add_progress(kwargs, self.repo.git, progress) proc = self.repo.git.pull( - self, refspec, with_stdout=False, as_process=True, universal_newlines=True, v=True, **kwargs + "--", self, refspec, with_stdout=False, as_process=True, universal_newlines=True, v=True, **kwargs ) res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout) if hasattr(self.repo.odb, "update_cache"): @@ -1034,6 +1034,7 @@ class Remote(LazyMixin, IterableObj): be 0.""" kwargs = add_progress(kwargs, self.repo.git, progress) proc = self.repo.git.push( + "--", self, refspec, porcelain=True, |