summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/utils/JGitUtils.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-03-24 14:50:35 -0400
committerJames Moger <james.moger@gitblit.com>2012-03-24 14:50:35 -0400
commit87db82f28371bac4a8bf4551ad964078301da8bd (patch)
tree18bed5050578445b017e47fe3da687eca8a850e2 /src/com/gitblit/utils/JGitUtils.java
parent5b29c53b326b5fd283cb06356e94df5f78508860 (diff)
downloadgitblit-87db82f28371bac4a8bf4551ad964078301da8bd.tar.gz
gitblit-87db82f28371bac4a8bf4551ad964078301da8bd.zip
Ensure that FederationPullExecutor resets to FETCH_HEAD for mirrors
Diffstat (limited to 'src/com/gitblit/utils/JGitUtils.java')
-rw-r--r--src/com/gitblit/utils/JGitUtils.java23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index 99b2f738..f495a38f 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -36,8 +36,6 @@ import java.util.zip.ZipOutputStream;
import org.eclipse.jgit.api.CloneCommand;
import org.eclipse.jgit.api.FetchCommand;
import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.ResetCommand;
-import org.eclipse.jgit.api.ResetCommand.ResetType;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.diff.DiffFormatter;
@@ -253,27 +251,6 @@ public class JGitUtils {
}
/**
- * Reset HEAD to the latest remote tracking commit.
- *
- * @param repository
- * @param remoteRef
- * the remote tracking reference (e.g. origin/master)
- * @return Ref
- * @throws Exception
- */
- public static Ref resetHEAD(Repository repository, String remoteRef) throws Exception {
- if (!remoteRef.startsWith(Constants.R_REMOTES)) {
- remoteRef = Constants.R_REMOTES + remoteRef;
- }
- Git git = new Git(repository);
- ResetCommand reset = git.reset();
- reset.setMode(ResetType.SOFT);
- reset.setRef(remoteRef);
- Ref result = reset.call();
- return result;
- }
-
- /**
* Creates a bare repository.
*
* @param repositoriesFolder