| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3b1cfcc commit a2d248b
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ | |||
| 25 | 25 | NULL_TREE, | |
| 26 | 26 | ) | |
| 27 | 27 | import ddt | |
| 28 | + from git.cmd import Git | ||
| 28 | 29 | ||
| 29 | 30 | ||
| 30 | 31 | @ddt.ddt | |
@@ -56,7 +57,7 @@ def test_diff_with_staged_file(self, rw_dir): | |||
| 56 | 57 | fp = os.path.join(rw_dir, 'hello.txt') | |
| 57 | 58 | with open(fp, 'w') as fs: | |
| 58 | 59 | fs.write("hello world") | |
| 59 | - r.git.add(fp) | ||
| 60 | + r.git.add(Git.polish_url(fp)) | ||
| 60 | 61 | r.git.commit(message="init") | |
| 61 | 62 | ||
| 62 | 63 | with open(fp, 'w') as fs: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -705,7 +705,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir): | |||
| 705 | 705 | fp = osp.join(smm.working_tree_dir, 'empty-file') | |
| 706 | 706 | with open(fp, 'w'): | |
| 707 | 707 | pass | |
| 708 | - smm.git.add(fp) | ||
| 708 | + smm.git.add(Git.polish_url(fp)) | ||
| 709 | 709 | smm.git.commit(m="new file added") | |
| 710 | 710 | ||
| 711 | 711 | # submodules are retrieved from the current commit's tree, therefore we can't really get a new submodule | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -264,6 +264,7 @@ def _cygexpath(drive, path): | |||
| 264 | 264 | ||
| 265 | 265 | ||
| 266 | 266 | def cygpath(path): | |
| 267 | + """Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment.""" | ||
| 267 | 268 | if not path.startswith(('/cygdrive', '//')): | |
| 268 | 269 | for regex, parser, recurse in _cygpath_parsers: | |
| 269 | 270 | match = regex.match(path) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments