aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
index 9685d4517a..dde1a332db 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
@@ -92,6 +92,19 @@ public class FetchTest extends CLIRepositoryTestCase {
}
@Test
+ public void testFetchForceUpdate() throws Exception {
+ String[] result = execute(
+ "git fetch test refs/heads/master:refs/remotes/origin/master");
+ assertEquals(" * [new branch] master -> origin/master",
+ result[1]);
+ assertEquals(" * [new tag] tag -> tag", result[2]);
+ remoteGit.commit().setAmend(true).setMessage("amended").call();
+ result = execute(
+ "git fetch -f test refs/heads/master:refs/remotes/origin/master");
+ assertEquals("", result[0]);
+ }
+
+ @Test
public void testFetchNoTags() throws Exception {
String[] result = execute("git fetch --no-tags test refs/heads/master:refs/remotes/origin/master");
assertEquals(" * [new branch] master -> origin/master",