aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-11-15 01:23:00 +0100
committerBond_009 <bond.009@outlook.com>2020-11-15 01:23:00 +0100
commitace2ca4b883939e896b362d1977446d299481670 (patch)
treec25b11be5a917429df49e365f94940ef3a298eac /src/main.rs
parentc45490ed54bcc1e42f2a723234e7baf12de55c32 (diff)
Temp fix?
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 42f37dc..2007e39 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,7 +8,7 @@ use std::{
};
use clap::*;
-use git2::{build::CheckoutBuilder, AutotagOption, Direction, FetchOptions, Repository};
+use git2::{build::CheckoutBuilder, Direction, Repository};
use config::*;
@@ -108,20 +108,17 @@ fn update() {
}
};
- let mut fo = FetchOptions::new();
- fo.download_tags(AutotagOption::All);
let mut remote = repo.find_remote("origin").unwrap();
remote.connect(Direction::Fetch).unwrap();
let branch_buf = remote.default_branch().unwrap();
let branch = branch_buf.as_str().unwrap();
- if remote.fetch(&[branch], Some(&mut fo), None).is_err() {
+ if remote.fetch(&[branch], None, None).is_err() {
eprintln!("Failed fetching branch {} for {:#?}", branch, &path);
continue;
}
let fetch_head = repo.find_reference("FETCH_HEAD").unwrap();
let com = repo.reference_to_annotated_commit(&fetch_head).unwrap();
-
let mut branch_ref = repo.find_reference(&branch).unwrap();
branch_ref.set_target(com.id(), "IDK").unwrap();
repo.set_head(&branch).unwrap();