Log fetched refs

This commit is contained in:
Joscha 2023-08-17 15:42:16 +02:00
parent b9a5cddc42
commit 96e5881665
3 changed files with 13 additions and 7 deletions

View file

@ -102,7 +102,7 @@ pub fn fetch_head(path: &Path, url: &str) -> Result<(), Error> {
Ok(())
}
pub fn fetch(path: &Path, url: &str, refspecs: &[String]) -> Result<(), Error> {
pub fn fetch(path: &Path, url: &str, refspecs: &[String]) -> Result<Output, Error> {
let mut command = Command::new("git");
command
.arg("-C")
@ -114,6 +114,5 @@ pub fn fetch(path: &Path, url: &str, refspecs: &[String]) -> Result<(), Error> {
for refspec in refspecs {
command.arg(refspec);
}
run(command)?;
Ok(())
run(command)
}