We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86ceb96 commit f1ec752Copy full SHA for f1ec752
git/index/base.py
@@ -377,13 +377,13 @@ def raise_exc(e):
377
continue
378
# end check symlink
379
380
- # if abs_path exists, yield it, otherwise resolve globs if possible
+ # if abs_path exists, yield it
381
if os.path.exists(abs_path):
382
# 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
+ # if it exists, we take it
384
yield abs_path
385
- # otherwise resolve globs if possible
386
- elif '?' in path or '*' in path or '[' in path:
+ # resolve globs if possible
+ if '?' in path or '*' in path or '[' in path:
387
resolved_paths = glob.glob(abs_path)
388
# not abs_path in resolved_paths:
389
# a glob() resolving to the same path we are feeding it with
0 commit comments