diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2011-03-03 14:36:19 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2011-03-03 15:13:33 -0800 |
commit | 3ee3588b86637f97f98f2562171762822cfc2ce6 (patch) | |
tree | a93840b0af7bb19eacdeffa7d61843039ed0f681 /org.eclipse.jgit.test/tst | |
parent | a468cb57c2f2fbd8da163f002b505255ea768244 (diff) | |
download | jgit-3ee3588b86637f97f98f2562171762822cfc2ce6.tar.gz jgit-3ee3588b86637f97f98f2562171762822cfc2ce6.zip |
RemoteRefUpdate: Accept Ref and ObjectId arguments for source
Applications may already have a Ref or ObjectId on hand that they want
the remote to be updated to. Instead of converting these into a
String and relying on the parsing rules of resolve(), allow the
application to supply the Ref or ObjectId directly.
Bug: 338839
Change-Id: If5865ac9eb069de1c8f224090b6020fc422f9f12
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java index bb009e9138..8b904bb2ca 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java @@ -169,7 +169,7 @@ public class PushProcessTest extends SampleDataRepositoryTestCase { */ @Test public void testUpdateDelete() throws IOException { - final RemoteRefUpdate rru = new RemoteRefUpdate(db, null, + final RemoteRefUpdate rru = new RemoteRefUpdate(db, (String) null, "refs/heads/master", false, null, null); final Ref ref = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/master", ObjectId.fromString("2c349335b7f797072cf729c4f3bb0914ecb6dec9")); @@ -184,7 +184,7 @@ public class PushProcessTest extends SampleDataRepositoryTestCase { */ @Test public void testUpdateDeleteNonExisting() throws IOException { - final RemoteRefUpdate rru = new RemoteRefUpdate(db, null, + final RemoteRefUpdate rru = new RemoteRefUpdate(db, (String) null, "refs/heads/master", false, null, null); testOneUpdateStatus(rru, null, Status.NON_EXISTING, null); } @@ -279,12 +279,12 @@ public class PushProcessTest extends SampleDataRepositoryTestCase { */ @Test public void testUpdateMixedCases() throws IOException { - final RemoteRefUpdate rruOk = new RemoteRefUpdate(db, null, + final RemoteRefUpdate rruOk = new RemoteRefUpdate(db, (String) null, "refs/heads/master", false, null, null); final Ref refToChange = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/master", ObjectId.fromString("2c349335b7f797072cf729c4f3bb0914ecb6dec9")); - final RemoteRefUpdate rruReject = new RemoteRefUpdate(db, null, - "refs/heads/nonexisting", false, null, null); + final RemoteRefUpdate rruReject = new RemoteRefUpdate(db, + (String) null, "refs/heads/nonexisting", false, null, null); refUpdates.add(rruOk); refUpdates.add(rruReject); advertisedRefs.add(refToChange); |