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

Commit2ba39bd

Browse files
toanantByron
authored andcommitted
Fixed#731
Added check for local file url starting with `$HOME` / `~` to expand them using `os.path.expanduser`.
1 parent4ba1cea commit2ba39bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎git/cmd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ def polish_url(cls, url, is_cygwin=None):
330330
but git stops liking them as it will escape the backslashes.
331331
Hence we undo the escaping just to be sure.
332332
"""
333+
ifurl.startswith('$HOME/'):
334+
url=url.replace('$HOME/','~/')
335+
ifurl.startswith('~'):
336+
url=os.path.expanduser(url)
333337
url=url.replace("\\\\","\\").replace("\\","/")
334338

335339
returnurl

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp