This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(test)] | |
mod test { | |
#[test] | |
fn foo() { | |
// start a local tcp echo server: | |
// ncat -l 127.0.0.1 2000 -k -c 'xargs -n1 echo' | |
use ssh2::Session; | |
use std::io::prelude::*; | |
use std::net::TcpStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git-review() { | |
local search="$1" | |
local commits=$(git --no-pager log --all --oneline --grep=$search | cut -d ' ' -f1 | paste -sd ' ') | |
if [ -z "$commits" ] | |
then | |
echo "No commits found for $search" | |
else | |
git show --pretty=short --show-signature $(echo $commits) | vim - | |
fi | |
} |