From d07ecd2a1b0d1ae12397bce1dfb2fe1355e6ff10 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Wed, 23 Sep 2020 11:38:22 +0100 Subject: [PATCH] During pull: reset repo before writing data --- .../java/uk/ac/ic/wlgitbridge/bridge/repo/GitProjectRepo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/repo/GitProjectRepo.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/repo/GitProjectRepo.java index 6f020d79ad..5c7ac2cb07 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/repo/GitProjectRepo.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/repo/GitProjectRepo.java @@ -240,6 +240,7 @@ public class GitProjectRepo implements ProjectRepo { ) throws IOException, GitAPIException { Preconditions.checkState(repository.isPresent()); Repository repo = getJGitRepository(); + resetHard(); String name = getProjectName(); Log.info("[{}] Writing commit", name); contents.write();