Skip to content

Adding compact subcommand#170

Merged
thomaslaurenson merged 2 commits into
thegraydot:mainfrom
sjoblomj:compact
Jun 7, 2026
Merged

Adding compact subcommand#170
thomaslaurenson merged 2 commits into
thegraydot:mainfrom
sjoblomj:compact

Conversation

@sjoblomj

@sjoblomj sjoblomj commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Many operations, like remove, can leave gaps in the archives. This PR adds the compact subcommand to rebuild the archive which shrinks its size.

@sjoblomj

sjoblomj commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

I was thinking of adding a --compact flag to the add and remove subcommands as well, which seems convenient to me, but I'm not sure...

Especially add already have plenty of arguments. And if the user tries to --compact with archives that don't have internal listfiles, the command would fail (unless we allowed providing listfiles in those subcommands as well - but that adds further complexity and cognitive load on the user when trying to understand how to use the tool). I'm leaning towards letting the user manually run mpqcli compact afterwards instead of providing convenience flags to add and remove. What do you think?

@thomaslaurenson thomaslaurenson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition - looks good to merge as is. I will delete the 0.9.10 release I made yesterday and make it into a new 0.10.0 release, as there were so many changes that it deserves a minor version bump, not just patch. Will include this PR in the release.

@thomaslaurenson thomaslaurenson merged commit 46da494 into thegraydot:main Jun 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants