Skip to content

Parsing subprocess output #122

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

Merged

Conversation

Michael-F-Bryan
Copy link
Contributor

This adds an example which calls git log --oneline in a subprocess and parses stdout to grab the hash and commit message for all commits in the current repo's history as discussed in #108.

I'm not quite sure which category this example belongs in. About the closes thing would be filesystem, but calling a subprocess doesn't really have anything to do with the filesystem...

(fixes #108)

@budziq
Copy link
Collaborator

budziq commented May 18, 2017

Both cathegories look appropriate
https://crates.io/categories/os
https://crates.io/categories/text-processing

@Michael-F-Bryan
Copy link
Contributor Author

Cheers @budziq! If everything looks okay, this should be ready to merge.

@budziq
Copy link
Collaborator

budziq commented May 18, 2017

@Michael-F-Bryan excellent work! Only one minor nit. All git commits are shown which makes the cargo test output very verbose. Would you consider limiting the output with Iterator::take()?

@Michael-F-Bryan
Copy link
Contributor Author

Good spot, I've limited it to just the last 5 commits so that should fix it. Is there anything else which can be improved?

@budziq
Copy link
Collaborator

budziq commented May 18, 2017

Looks very good to me. But all maintainers are based in US so merge will have to wait a little.

@dtolnay dtolnay merged commit 862f601 into rust-lang-nursery:master May 18, 2017
@dtolnay
Copy link
Member

dtolnay commented May 18, 2017

Nicely done. Thank you!

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.

Run an external command and collect stdout
3 participants