Skip to content

Commit f1ec752

Browse files
authored
glob also path even when it exists
as tests fails, bring back glob even if path exists
1 parent 86ceb96 commit f1ec752

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git/index/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ def raise_exc(e):
377377
continue
378378
# end check symlink
379379

380-
# if abs_path exists, yield it, otherwise resolve globs if possible
380+
# if abs_path exists, yield it
381381
if os.path.exists(abs_path):
382382
# even if the path contains special characters like ?*[ (glob)
383-
# if it exists, we take it as such and do not try to resolve globs
383+
# if it exists, we take it
384384
yield abs_path
385-
# otherwise resolve globs if possible
386-
elif '?' in path or '*' in path or '[' in path:
385+
# resolve globs if possible
386+
if '?' in path or '*' in path or '[' in path:
387387
resolved_paths = glob.glob(abs_path)
388388
# not abs_path in resolved_paths:
389389
# a glob() resolving to the same path we are feeding it with

0 commit comments

Comments
 (0)