Skip to content

Commit 416daa0

Browse files
committed
fix(refs): don't assume linux path separator
Instead, work with os.sep. Fixes #586
1 parent 2ede752 commit 416daa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/refs/symbolic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def _iter_items(cls, repo, common_path=None):
574574
# walk loose refs
575575
# Currently we do not follow links
576576
for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)):
577-
if 'refs/' not in root: # skip non-refs subfolders
577+
if 'refs' not in root.split(os.sep): # skip non-refs subfolders
578578
refs_id = [d for d in dirs if d == 'refs']
579579
if refs_id:
580580
dirs[0:] = ['refs']

0 commit comments

Comments
 (0)