From 42d91a31a899aac07727663a0b377c96252abe66 Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Sat, 7 Sep 2024 22:25:33 +0700 Subject: [PATCH] sandalphon: dont touch origin when user clone is requested (#663) --- .../problem/base/version/ProblemVersionStore.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/judgels-backends/judgels-server-app/src/main/java/judgels/sandalphon/problem/base/version/ProblemVersionStore.java b/judgels-backends/judgels-server-app/src/main/java/judgels/sandalphon/problem/base/version/ProblemVersionStore.java index b6838da08..41bac2041 100644 --- a/judgels-backends/judgels-server-app/src/main/java/judgels/sandalphon/problem/base/version/ProblemVersionStore.java +++ b/judgels-backends/judgels-server-app/src/main/java/judgels/sandalphon/problem/base/version/ProblemVersionStore.java @@ -65,7 +65,7 @@ public boolean updateUserClone(String userJid, String problemJid) { public boolean pushUserClone(String userJid, String problemJid) { Path origin = getOriginDirPath(problemJid); - Path root = getRootDirPath(userJid, problemJid); + Path root = getCloneDirPath(userJid, problemJid); if (problemGit.push(root)) { problemGit.resetHard(origin); @@ -79,13 +79,13 @@ public boolean pushUserClone(String userJid, String problemJid) { } public boolean fetchUserClone(String userJid, String problemJid) { - Path root = getRootDirPath(userJid, problemJid); + Path root = getCloneDirPath(userJid, problemJid); return problemGit.fetch(root); } public void discardUserClone(String userJid, String problemJid) { - Path root = getRootDirPath(userJid, problemJid); + Path root = getCloneDirPath(userJid, problemJid); problemFs.removeFile(root); }