From 76079daf1e2175d02c9c584e47a21650fce30bb6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 23 Aug 2020 18:38:34 +0200 Subject: git-sugdiff: Add `--no-pager` to `git diff` command The diff command wasn't exiting after outputting the diff. Add the `--no-pager` argument to ensure that the pager doesn't activate. This also seems to cause the command to exit once all the output is printed. We don't want the pager because we need to call `git diff` for each suggestion. If an early diff took up more than a page and activated the pager, that would block the next diffs from appearing. We want them all to appear at once. --- src/bin/git-sugdiff.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/git-sugdiff.rs b/src/bin/git-sugdiff.rs index 9c7ff1f..6bc67d9 100644 --- a/src/bin/git-sugdiff.rs +++ b/src/bin/git-sugdiff.rs @@ -46,6 +46,7 @@ fn main() { let blob = suggestion.diff_command().unwrap(); Command::new("git") + .arg("--no-pager") .arg("diff") .arg(format!("{}:{}", suggestion.commit(), suggestion.path())) .arg(blob.to_string()) -- cgit v1.2.3