Skip to content

Some changes#359

Merged
cgwalters merged 2 commits into
composefs:mainfrom
Johan-Liebert1:some-changes
Jul 15, 2026
Merged

Some changes#359
cgwalters merged 2 commits into
composefs:mainfrom
Johan-Liebert1:some-changes

Conversation

@Johan-Liebert1

@Johan-Liebert1 Johan-Liebert1 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

clap: Show usage and suggestions

Add features "error-context" and "suggestions" to show suggestions on
incorrect command usage

Before

./target/release/cfsctl --repo sysroot dump-files
error: one or more required arguments were not provided

After

./target/release/cfsctl --repo sysroot dump-files

error: the following required arguments were not provided:
  <IMAGE_NAME>

Usage: cfsctl dump-files <IMAGE_NAME> [FILES]...

For more information, try '--help'.

cfsctl: Make dump_files public

Useful in bootc to get backing path. Also update the signature to take
in a repository and an image name for better UX

Add features "error-context" and "suggestions" to show suggestions on
incorrect command usage

Before

```sh
./target/release/cfsctl --repo sysroot dump-files
error: one or more required arguments were not provided
```

After

```sh
./target/release/cfsctl --repo sysroot dump-files

error: the following required arguments were not provided:
  <IMAGE_NAME>

Usage: cfsctl dump-files <IMAGE_NAME> [FILES]...

For more information, try '--help'.
```

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Useful in bootc to get backing path. Also update the signature to take
in a repository and an image name for better UX

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

@jeckersb jeckersb 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.

I think dump_files as a public API would be more generally useful if it returned an Iterator that yielded the dumped representation of each file. Then in the DumpFiles command we can just iterate and print it. But library users will have the actual dump data available.

@giuseppe giuseppe 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.

LGTM

@cgwalters
cgwalters added this pull request to the merge queue Jul 15, 2026
@cgwalters

Copy link
Copy Markdown
Collaborator

I think dump_files as a public API would be more generally useful if it returned an Iterator that yielded the dumped representation of each file. Then in the DumpFiles command we can just iterate and print it. But library users will have the actual dump data available.

Library users can already operate on the in-memory filesystem representation directly I think.

Merged via the queue into composefs:main with commit 50a106a Jul 15, 2026
18 of 19 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.

4 participants