Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork965
Respectos.Pathlike#2086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Respectos.Pathlike#2086
Changes fromall commits
e3f38ff24abf10ad1ae5f5d2632559c3c8091d4cc50414bf73801505086e832b3908ed50aea9957a3af1df8087a1722561921ca8ab5abe0f12e15ba8434967File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -126,6 +126,7 @@ class Repo: | ||
| working_dir: PathLike | ||
| """The working directory of the git command.""" | ||
| # stored as string for easier processing, but annotated as path for clearer intention | ||
| _working_tree_dir: Optional[PathLike] = None | ||
George-Ogden marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| git_dir: PathLike | ||
| @@ -215,15 +216,13 @@ def __init__( | ||
| epath = path or os.getenv("GIT_DIR") | ||
| if not epath: | ||
| epath = os.getcwd() | ||
| epath = os.fspath(epath) | ||
| if Git.is_cygwin(): | ||
| # Given how the tests are written, this seems more likely to catch Cygwin | ||
| # git used from Windows than Windows git used from Cygwin. Therefore | ||
| # changing to Cygwin-style paths is the relevant operation. | ||
| epath = cygpath(epath) | ||
| if expand_vars and re.search(self.re_envvars, epath): | ||
| warnings.warn( | ||
| "The use of environment variables in paths is deprecated" | ||
| @@ -957,7 +956,7 @@ def is_dirty( | ||
| if not submodules: | ||
| default_args.append("--ignore-submodules") | ||
| if path: | ||
| default_args.extend(["--",os.fspath(path)]) | ||
| if index: | ||
| # diff index against HEAD. | ||
| if osp.isfile(self.index.path) and len(self.git.diff("--cached", *default_args)): | ||
| @@ -1357,9 +1356,9 @@ def _clone( | ||
| ) -> "Repo": | ||
| odbt = kwargs.pop("odbt", odb_default_type) | ||
| #url may be apathand this has no effect if itisa string | ||
| url = os.fspath(url) | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. URL is not a path though. ContributorAuthor
| ||
| path =os.fspath(path) | ||
| ## A bug win cygwin's Git, when `--bare` or `--separate-git-dir` | ||
| # it prepends the cwd or(?) the `url` into the `path, so:: | ||
| @@ -1376,7 +1375,7 @@ def _clone( | ||
| multi = shlex.split(" ".join(multi_options)) | ||
| if not allow_unsafe_protocols: | ||
| Git.check_unsafe_protocols(url) | ||
| if not allow_unsafe_options: | ||
| Git.check_unsafe_options(options=list(kwargs.keys()), unsafe_options=cls.unsafe_git_clone_options) | ||
| if not allow_unsafe_options and multi_options: | ||
| @@ -1385,7 +1384,7 @@ def _clone( | ||
| proc = git.clone( | ||
| multi, | ||
| "--", | ||
| Git.polish_url(url), | ||
| clone_path, | ||
| with_extended_output=True, | ||
| as_process=True, | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.