diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2017-08-20 21:45:52 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2017-08-20 21:45:52 +0200 |
commit | f3c7ede6af566839918cb884cde5572049962f7f (patch) | |
tree | d2297bb55de5e6df75b2f25503518dc169af06f4 /src/bin/pre-push.rs | |
parent | 6503d1d27ddfb23385e037ac9dc8de3cb12205e5 (diff) |
Added logging of stdin
Stdin is used to provide additional info on some hooks, like on
pre-push.
Diffstat (limited to 'src/bin/pre-push.rs')
-rw-r--r-- | src/bin/pre-push.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/pre-push.rs b/src/bin/pre-push.rs index a290af2..41f3bbb 100644 --- a/src/bin/pre-push.rs +++ b/src/bin/pre-push.rs @@ -1,6 +1,14 @@ use std::env; +use std::io::{stdin, BufRead}; fn main() { let args: Vec<_> = env::args().skip(1).collect(); println!("pre-push called with {:?}", args); + + println!("BEGIN STDIN for pre-push"); + let stdin = stdin(); + for line in stdin.lock().lines() { + println!("{:?}", line); + } + println!("END STDIN"); } |