Charles O'Farrell [off-list ref] wrote:
+public class RefUpdateTest extends RepositoryTestCase {
+
+ public void testDeleteHead() throws IOException {
+ final RefUpdate ref = updateRef(Constants.HEAD);
+ delete(ref, Result.NOT_ATTEMPTED, true, false);
+ }
+}
So I see you didn't run the unit tests before emailing. ;-)
I squashed this into the patch I am replying to:
diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
index 62a60c3..1ade2ef 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
@@ -72,7 +72,7 @@ public void testLooseDelete() throws IOException {
public void testDeleteHead() throws IOException {
final RefUpdate ref = updateRef(Constants.HEAD);
- delete(ref, Result.NOT_ATTEMPTED, true, false);
+ delete(ref, Result.REJECTED_CURRENT_BRANCH, true, false);
}
public void testLogDeleted() throws IOException {
Otherwise the series looks good. Compiles. Passes tests.
Tests look correct. Thanks!
--
Shawn.