Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix 'find' command short format. #139

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

alilleybrinker
Copy link
Member

Previously, the 'short' format on the 'find' command would actually
just re-print the hash that was provided, as it was treating the
output identically to the id command. This commit introduces a new
Msg constructor for the find version, which is identical to the
id version for the plain and json formats, but which only
prints the found path in the 'short' format.

It also slightly refactors printing in Msg to avoid the trait object
and instead just match on the message status to decide where to write.

Signed-off-by: GitHub [email protected]

Previously, the 'short' format on the 'find' command would actually
just re-print the hash that was provided, as it was treating the
output identically to the `id` command. This commit introduces a new
`Msg` constructor for the `find` version, which is identical to the
`id` version for the `plain` and `json` formats, but which _only_
prints the found path in the 'short' format.

It also slightly refactors printing in `Msg` to avoid the trait object
and instead just match on the message status to decide where to write.

Signed-off-by: GitHub <[email protected]>
@alilleybrinker alilleybrinker merged commit 6f3c48b into main Mar 4, 2024
8 checks passed
@alilleybrinker alilleybrinker deleted the alilleybrinker/fix-find branch March 4, 2024 17:26
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.

1 participant