Skip to content

Commit

Permalink
Change fetching refs to be forced and allow updating the head
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangiebel committed Sep 8, 2023
1 parent 83ca8dd commit 71c0d22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SS14.MapServer/Services/GitService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using LibGit2Sharp;
using LibGit2Sharp.Handlers;
using Serilog;
using SS14.MapServer.BuildRunners;
using SS14.MapServer.Configuration;
Expand Down Expand Up @@ -100,7 +101,7 @@ private void Pull(string repoDirectory, string gitRef)
repository.Config.Set("user.email", "git@mapserver.localhost");

_log.Debug("Fetching ref");
_buildService.Run(repoDirectory, "git", new List<string> { "fetch origin", gitRef }).Wait();
_buildService.Run(repoDirectory, "git", new List<string> { "fetch -fu origin", gitRef }).Wait();

_log.Debug("Checking out {Ref}", StripRef(gitRef));
Commands.Checkout(repository, StripRef(gitRef));
Expand Down

0 comments on commit 71c0d22

Please sign in to comment.