diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/git-sugdiff.rs | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/src/bin/git-sugdiff.rs b/src/bin/git-sugdiff.rs index c8ecf40..9c7ff1f 100644 --- a/src/bin/git-sugdiff.rs +++ b/src/bin/git-sugdiff.rs @@ -16,6 +16,7 @@  use std::env;  use std::process; +use std::process::Command;  use exitcode; @@ -42,7 +43,14 @@ fn main() {          &config,          |suggestion| {              // TODO: Needs to work for multiple suggestions at once -            suggestion.diff_command().unwrap(); +            let blob = suggestion.diff_command().unwrap(); + +            Command::new("git") +                .arg("diff") +                .arg(format!("{}:{}", suggestion.commit(), suggestion.path())) +                .arg(blob.to_string()) +                .spawn() +                .unwrap();          },      );  } | 
