Skip to content

Commit b449c86

Browse files
committed
Revert "fs: support root_marker (#25)"
This reverts commit 42db9e4.
1 parent 238a4a1 commit b449c86

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

scmrepo/fs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959

6060
def _get_key(self, path: str) -> Tuple[str, ...]:
6161
relparts = path.split(self.sep)
62-
if relparts == [self.root_marker]:
62+
if relparts == ["."]:
6363
return ()
6464
return tuple(relparts)
6565

tests/test_fs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def convert_to_sets(walk_results):
8282
for root, dirs, nondirs in walk_results
8383
]
8484

85-
assert convert_to_sets(fs.walk("")) == convert_to_sets(
85+
assert convert_to_sets(fs.walk(".")) == convert_to_sets(
8686
[
8787
("", ["data"], []),
8888
("data", ["subdir"], []),
@@ -116,8 +116,8 @@ def test_ls(tmp_dir: TmpDir, scm: Git):
116116
scm.add_commit(files, message="add")
117117
fs = scm.get_fs("master")
118118

119-
assert fs.ls("", detail=False) == ["foo", "тест", "data"]
120-
assert fs.ls("") == {
119+
assert fs.ls(".", detail=False) == ["foo", "тест", "data"]
120+
assert fs.ls(".") == {
121121
"data": {
122122
"mode": 16384,
123123
"name": "data",

tests/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_walk_with_submodules(
126126
files = []
127127
dirs = []
128128
fs = scm.get_fs("HEAD")
129-
for _, dnames, fnames in fs.walk(""):
129+
for _, dnames, fnames in fs.walk("."):
130130
dirs.extend(dnames)
131131
files.extend(fnames)
132132

0 commit comments

Comments
 (0)