From d4bebd6dbbac7cb33b10b6c91df6e56653c6054a Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sun, 3 Jun 2018 13:28:55 +0300 Subject: [PATCH] Pull with --rebase and --autostash (fix #2) --- src/git.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/git.rs b/src/git.rs index 85fe6401..5b78c5ad 100644 --- a/src/git.rs +++ b/src/git.rs @@ -40,7 +40,13 @@ impl Git { pub fn pull>(&self, path: P) -> Result<()> { if let Some(git) = &self.git { - if let Ok(mut command) = Command::new(&git).arg("pull").current_dir(path).spawn() { + if let Ok(mut command) = Command::new(&git) + .arg("pull") + .arg("--rebase") + .arg("--autostash") + .current_dir(path) + .spawn() + { command.wait()?; } }