Pull with --rebase and --autostash (fix #2)

This commit is contained in:
Roey Darwish Dror
2018-06-03 13:28:55 +03:00
parent e70950de02
commit d4bebd6dbb

View File

@@ -40,7 +40,13 @@ impl Git {
pub fn pull<P: AsRef<Path>>(&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()?;
}
}