Inject flags before sub-command in argv.
(self, cmd, *argv, git_dir=None, **kwargs)
| 35 | self.bin = default_bin(git_bin, "git") |
| 36 | |
| 37 | def run_cmd(self, cmd, *argv, git_dir=None, **kwargs): |
| 38 | """ Inject flags before sub-command in argv. """ |
| 39 | opts = [] |
| 40 | if git_dir is not None: |
| 41 | opts.extend(["-C", _stringify_path(git_dir)]) |
| 42 | |
| 43 | return self.run(*opts, cmd, *argv, **kwargs) |
| 44 | |
| 45 | @capture_stdout(strip=False) |
| 46 | @git_cmd |