FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Only resolve globs if path does not exist on disk · AlanCoding/GitPython@0420b01 · GitHub

Repository navigation

Commit 0420b01

Browse files
committed
Only resolve globs if path does not exist on disk
Fixes gitpython-developers#994
1 parent d39bd53 commit 0420b01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎git/index/base.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ def raise_exc(e):
373373
continue
374374
# end check symlink
375375

376-
# resolve globs if possible
377-
if '?' in path or '*' in path or '[' in path:
376+
# if the path is not already pointing to an existing file, resolve globs if possible
377+
if not os.path.exists(path) and ('?' in path or '*' in path or '[' in path):
378378
resolved_paths = glob.glob(abs_path)
379379
# not abs_path in resolved_paths:
380380
# a glob() resolving to the same path we are feeding it with

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL