Skip to content

Commit

Permalink
Fix --ignore-untracked flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Aug 7, 2024
1 parent d3b32ce commit 2654c89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

* Fixed: The `--ignore-untracked` CLI flag was ignored.

## v1.21.2 (2024-06-26)

* Fixed: Some timestamps could fail to parse on Python 3.5 and 3.6.
Expand Down
7 changes: 6 additions & 1 deletion dunamai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ def from_vcs(
strict: bool,
path: Optional[Path],
pattern_prefix: Optional[str],
ignore_untracked: bool,
) -> None:
version = Version.from_vcs(vcs, pattern, latest_tag, tag_dir, tag_branch, full_commit, strict, path, pattern_prefix)
version = Version.from_vcs(
vcs, pattern, latest_tag, tag_dir, tag_branch, full_commit, strict, path, pattern_prefix, ignore_untracked
)

for concern in version.concerns:
print("Warning: {}".format(concern.message()), file=sys.stderr)
Expand All @@ -289,6 +292,7 @@ def main() -> None:
tag_dir = getattr(args, "tag_dir", "tags")
tag_branch = getattr(args, "tag_branch", None)
full_commit = getattr(args, "full_commit", False)
ignore_untracked = getattr(args, "ignore_untracked", False)
from_vcs(
Vcs(args.vcs),
args.pattern,
Expand All @@ -306,6 +310,7 @@ def main() -> None:
args.strict,
Path(args.path) if args.path is not None else None,
args.pattern_prefix,
ignore_untracked,
)
elif args.command == "check":
version = from_stdin(args.version)
Expand Down

0 comments on commit 2654c89

Please sign in to comment.