Skip to content

Commit

Permalink
first prune, then fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
tmu-sprd committed Jan 3, 2025
1 parent 6b5a7b6 commit d435059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/r10k/git/stateful_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def sync(ref, force=true, exclude_spec=true)
if force
logger.warn(_("Overwriting local modifications to %{repo_path}") % {repo_path: @repo.path})
logger.debug(_("Updating %{repo_path} to %{ref}") % {repo_path: @repo.path, ref: ref })
@repo.fetch
@repo.prune
@repo.fetch
@repo.checkout(sha, {:force => force})
else
logger.warn(_("Skipping %{repo_path} due to local modifications") % {repo_path: @repo.path})
Expand Down

0 comments on commit d435059

Please sign in to comment.