From d43505954d12e31d379b8060556992858deda80d Mon Sep 17 00:00:00 2001 From: Tino Mueller Date: Fri, 3 Jan 2025 11:03:38 +0100 Subject: [PATCH] first prune, then fetch --- lib/r10k/git/stateful_repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/r10k/git/stateful_repository.rb b/lib/r10k/git/stateful_repository.rb index 5c54273d2..7108e482a 100644 --- a/lib/r10k/git/stateful_repository.rb +++ b/lib/r10k/git/stateful_repository.rb @@ -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})