summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2022-07-06 17:29:23 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2022-07-06 19:07:45 +0200
commit3fc0ec18228d392aecf5d15198e001815726b5d5 (patch)
treeeec583d62bdde6f49101024e5f20878f90bde5cd /org.eclipse.jgit.lfs.server.test
parentc6a64ecae7ea5519bb6460b38d7ec65a83dc6303 (diff)
parentf6935d8cd2e00d5923917ff869354e443da66014 (diff)
downloadjgit-3fc0ec18228d392aecf5d15198e001815726b5d5.tar.gz
jgit-3fc0ec18228d392aecf5d15198e001815726b5d5.zip
Merge branch 'master' into next
* master: (193 commits) Add aarch64 environment to target platform configuration JGit blame very slow for large merge commits that rename files UploadPack: don't prematurely terminate timer in case of error Do not create reflog for remote tracking branches during clone UploadPack: do not check reachability of visible SHA1s Fix warnings about non-externalized string literals [sshd] Correct signature for RSA keys from an SSH agent Run tests that checks araxis output only on Linux Add missing package import javax.management to org.eclipse.jgit Add 4.25 target platform for Eclipse 2022-09 Suppress API errors raised for new API introduced in 5.13.1 Eclipse 4.24 was released, adapt p2 URL accordingly Fix DefaultCharset bug pattern flagged by error prone Use SystemReader#getDefaultCharset to read console input Annotate the exception with the possible failure reason when Bitmaps are not enabled. Prepare 5.13.2-SNAPSHOT builds JGit v5.13.1.202206130422-r AmazonS3: Add support for AWS API signature version 4 Fix typo in DiffTools#compare javadoc Update jgit-last-release-version to 6.2.0.202206071550-r ... Change-Id: I561a0178f6bc512e8ce7d75f1870a044cb051fac
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test')
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/PushTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/PushTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/PushTest.java
index 70c0463e11..06708b334a 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/PushTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/PushTest.java
@@ -11,6 +11,7 @@ package org.eclipse.jgit.lfs.server.fs;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.io.InputStream;
import java.nio.file.Files;
@@ -29,6 +30,7 @@ import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
+import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.treewalk.TreeWalk;
import org.eclipse.jgit.treewalk.filter.PathFilter;
@@ -128,4 +130,18 @@ public class PushTest extends LfsServerTest {
server.getRequests().toString());
}
+ @Test
+ public void testDeleteBranch() throws Exception {
+ String branch = "new-branch";
+ git.branchCreate().setName(branch).call();
+
+ String destRef = Constants.R_HEADS + branch;
+ git.push().setRefSpecs(new RefSpec().setSource(branch).setDestination(destRef)).call();
+
+ // Should not fail on push.
+ git.branchDelete().setBranchNames(branch).setForce(true).call();
+ git.push().setRefSpecs(new RefSpec().setSource(null).setDestination(destRef)).call();
+
+ assertTrue(server.getRequests().isEmpty());
+ }
}