Skip to content

Commit e8e9db9

Browse files
committed
chore: missing fetch latest changes.
1 parent 1b1f517 commit e8e9db9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cite/git/src/repository/repository.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ impl Repository {
189189
// If repository doesn't exist, clone it first
190190
if !self.path.exists() {
191191
self.clone_repository()?;
192+
} else {
193+
// Repository exists, fetch latest changes to update existing branches/tags
194+
self.fetch_latest_changes(&self.remote)?;
192195
}
193196

194197
let git_repo = self.open_git_repo()?;
@@ -200,7 +203,7 @@ impl Repository {
200203
let mut fetch_options = FetchOptions::new();
201204
fetch_options.remote_callbacks(callbacks);
202205

203-
// Collect revisions that need fetching
206+
// Collect revisions that need fetching (after updating existing refs)
204207
let mut revisions_to_fetch = Vec::new();
205208
for revision in revisions {
206209
if !self.revision_exists(revision)? {

0 commit comments

Comments
 (0)