Skip to content

Commit f226377

Browse files
authored
Merge pull request #334 from jacebrowning/skip-build-dirs
Update nested config lookup to ignore certain directories
2 parents 7c9f462 + 11c1f0a commit f226377

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 3.5.1 (2024-05-19)
2+
3+
- Updated nested config lookup to ignore build and package directories.
4+
15
# 3.5 (2024-04-27)
26

37
- Added `--no-scripts` option to skip install/update scripts.

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ idna==3.3 ; python_version >= "3.8" and python_version < "4.0"
2222
importlib-metadata==4.12.0 ; python_version >= "3.8" and python_version < "4.0"
2323
iniconfig==1.1.1 ; python_version >= "3.8" and python_version < "4.0"
2424
isort==5.10.1 ; python_version >= "3.8" and python_version < "4.0"
25-
jinja2==3.1.3 ; python_version >= "3.8" and python_version < "4.0"
25+
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0"
2626
lazy-object-proxy==1.4.3 ; python_version >= "3.8" and python_version < "4.0"
2727
macfsevents==0.8.1 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "darwin"
2828
macholib==1.16 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "darwin"

gitman/commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def update(
171171
config = load_config(root)
172172
configs = [config] if config else []
173173
configs.extend(find_nested_configs(root, depth, []))
174+
174175
if configs:
175176
count = 0
176177
common.newline()

gitman/models/config.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,17 +431,17 @@ def find_nested_configs(
431431

432432
log.debug(f"Searching for nested project in: {root}")
433433
for name in os.listdir(root):
434-
if name.startswith("."):
434+
if name[0] in {".", "_", "@"}:
435+
continue
436+
if name in {"build", "dist", "node_modules", "venv"}:
435437
continue
436438
path = os.path.join(root, name)
437-
if os.path.isdir(path) and path not in skip_paths and not os.path.islink(path):
438-
config = load_config(path, search=False)
439-
if config:
439+
if path in skip_paths:
440+
continue
441+
if os.path.isdir(path) and not os.path.islink(path):
442+
if config := load_config(path, search=False):
440443
configs.append(config)
441444

442-
if os.path.islink(path):
443-
continue
444-
445445
if depth is not None:
446446
configs.extend(find_nested_configs(path, depth - 1, skip_paths))
447447
else:

poetry.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22

33
name = "gitman"
4-
version = "3.5"
4+
version = "3.5.1"
55
description = "A language-agnostic dependency manager using Git."
66

77
license = "MIT"

0 commit comments

Comments
 (0)