Skip to content

Commit

Permalink
Update the cloned repository head after fetching to reflect latest ch…
Browse files Browse the repository at this point in the history
…anges

Closes #78
  • Loading branch information
nabijaczleweli committed Apr 19, 2018
1 parent ba3a212 commit 6455d74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ impl GitRepoPackage {
let mut r = git2::Repository::open(clone_dir);
if let Ok(ref mut r) = r.as_mut() {
r.find_remote("origin").and_then(|mut rm| rm.fetch(&[self.branch.as_ref().map(String::as_str).unwrap_or("master")], None, None)).unwrap();
r.set_head("FETCH_HEAD").unwrap();
}
r
} else {
Expand Down

0 comments on commit 6455d74

Please sign in to comment.