Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4bde10d

Browse files
committed
fix typos preventing import
1 parent77f74ce commit4bde10d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

‎git/cmd.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ def _get_default_bash_path(cls):
334334
# This addresses issues where git hooks are intended to run assuming
335335
# the "native" Windows environment as seen by git.exe rather than
336336
# inside the git sandbox of WSL, which is likely configured
337-
# independetly of the Windows Git. A noteworthy example are repos with
338-
# Git LFS, where Git LFS may be installed in Windows but not in WSL.
337+
# independently of the Windows Git. A noteworthy example are repos
338+
# with Git LFS, where Git LFS may be installed in Windows but not
339+
# in WSL.
339340
ifnotis_win:
340341
return'bash'
341342
try:
@@ -346,7 +347,7 @@ def _get_default_bash_path(cls):
346347
gitpath=Path(wheregit.decode(defenc).splitlines()[0])
347348
gitroot=gitpath.parent.parent
348349
gitbash=gitroot/'bin'/'bash.exe'
349-
returnstr(gitbash)ifgitbash.existselse'bash.exe'
350+
returnstr(gitbash)ifgitbash.exists()else'bash.exe'
350351

351352
@classmethod
352353
defrefresh_bash(cls,path:Union[None,PathLike]=None)->bool:
@@ -357,7 +358,7 @@ def refresh_bash(cls, path: Union[None, PathLike] = None) -> bool:
357358
new_bash=os.path.abspath(new_bash)
358359
else:
359360
new_bash=os.environ.get(cls._bash_exec_env_var)
360-
ifnew_bashisNone:
361+
ifnotnew_bash:
361362
new_bash=cls._get_default_bash_path()
362363

363364
# Keep track of the old and new bash executable path.
@@ -369,7 +370,8 @@ def refresh_bash(cls, path: Union[None, PathLike] = None) -> bool:
369370
# executed for whatever reason.
370371
has_bash=False
371372
try:
372-
run([cls.GIT_PYTHON_BASH_EXECUTABLE,'--version'])
373+
run([cls.GIT_PYTHON_BASH_EXECUTABLE,'--version'],
374+
check=True,stdout=PIPE)
373375
has_bash=True
374376
exceptCalledProcessError:
375377
pass

‎randytest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
importgit

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp