~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ngit/gen/cs.patch

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
diff --git a/NGit.Test/NGit.Api/AddCommandTest.cs b/NGit.Test/NGit.Api/AddCommandTest.cs
2
 
index 89b84e7..c18e5b1 100644
 
2
index cddf21b..a5d21b5 100644
3
3
--- a/NGit.Test/NGit.Api/AddCommandTest.cs
4
4
+++ b/NGit.Test/NGit.Api/AddCommandTest.cs
5
 
@@ -583,7 +583,7 @@ namespace NGit.Api
 
5
@@ -584,7 +584,7 @@ namespace NGit.Api
6
6
                                return this;
7
7
                        }
8
8
 
11
11
                        {
12
12
                                return null;
13
13
                        }
14
 
@@ -625,7 +625,7 @@ namespace NGit.Api
 
14
@@ -631,7 +631,7 @@ namespace NGit.Api
15
15
                                return this;
16
16
                        }
17
17
 
21
21
                                return null;
22
22
                        }
23
23
diff --git a/NGit.Test/NGit.Api/BranchCommandTest.cs b/NGit.Test/NGit.Api/BranchCommandTest.cs
24
 
index 5a29930..2ee0f4a 100644
 
24
index 216aaa9..aca421b 100644
25
25
--- a/NGit.Test/NGit.Api/BranchCommandTest.cs
26
26
+++ b/NGit.Test/NGit.Api/BranchCommandTest.cs
27
 
@@ -503,13 +503,13 @@ namespace NGit.Api
28
 
                /// <exception cref="NGit.Api.Errors.RefNotFoundException"></exception>
29
 
                /// <exception cref="NGit.Api.Errors.InvalidRefNameException"></exception>
 
27
@@ -501,13 +501,13 @@ namespace NGit.Api
 
28
                /// <exception cref="NGit.Api.Errors.JGitInternalException"></exception>
 
29
                /// <exception cref="NGit.Api.Errors.GitAPIException"></exception>
30
30
                public virtual Ref CreateBranch(Git actGit, string name, bool force, string startPoint
31
31
-                       , CreateBranchCommand.SetupUpstreamMode mode)
32
32
+                       , CreateBranchCommand.SetupUpstreamMode? mode)
40
40
                        return cmd.Call();
41
41
                }
42
42
        }
 
43
diff --git a/NGit.Test/NGit.Api/CommitAndLogCommandTests.cs b/NGit.Test/NGit.Api/CommitAndLogCommandTests.cs
 
44
index 378aaf1..937a086 100644
 
45
--- a/NGit.Test/NGit.Api/CommitAndLogCommandTests.cs
 
46
+++ b/NGit.Test/NGit.Api/CommitAndLogCommandTests.cs
 
47
@@ -205,6 +205,9 @@ namespace NGit.Api
 
48
                [NUnit.Framework.Test]
 
49
                public virtual void TestMergeEmptyBranches()
 
50
                {
 
51
+                       if (!FS.DETECTED.SupportsExecute())
 
52
+                               return;
 
53
+
 
54
                        Git git = new Git(db);
 
55
                        git.Commit().SetMessage("initial commit").Call();
 
56
                        RefUpdate r = db.UpdateRef("refs/heads/side");
43
57
diff --git a/NGit.Test/NGit.Api/CommitCommandTest.cs b/NGit.Test/NGit.Api/CommitCommandTest.cs
44
 
index 724dd4c..64ff208 100644
 
58
index d7c442e..62a85d9 100644
45
59
--- a/NGit.Test/NGit.Api/CommitCommandTest.cs
46
60
+++ b/NGit.Test/NGit.Api/CommitCommandTest.cs
47
 
@@ -124,7 +124,7 @@ namespace NGit.Api
 
61
@@ -127,7 +127,7 @@ namespace NGit.Api
48
62
                                return this;
49
63
                        }
50
64
 
53
67
                        {
54
68
                                return null;
55
69
                        }
56
 
@@ -166,7 +166,7 @@ namespace NGit.Api
 
70
@@ -174,7 +174,7 @@ namespace NGit.Api
57
71
                                return this;
58
72
                        }
59
73
 
75
89
                {
76
90
                        Measure("Commencing test");
77
91
diff --git a/NGit.Test/NGit.Api/MergeCommandTest.cs b/NGit.Test/NGit.Api/MergeCommandTest.cs
78
 
index 3559b87..bf79da5 100644
 
92
index af6f9d2..d4d6feb 100644
79
93
--- a/NGit.Test/NGit.Api/MergeCommandTest.cs
80
94
+++ b/NGit.Test/NGit.Api/MergeCommandTest.cs
81
95
@@ -47,15 +47,14 @@ using NGit.Api.Errors;
94
108
-               [DataPoints]
95
109
                public static MergeStrategy[] mergeStrategies = MergeStrategy.Get();
96
110
 
97
 
                /// <exception cref="System.Exception"></exception>
98
 
@@ -177,7 +176,7 @@ namespace NGit.Api
 
111
                private GitDateFormatter dateFormatter;
 
112
@@ -187,7 +186,7 @@ namespace NGit.Api
99
113
 
100
114
                // expected this exception
101
115
                /// <exception cref="System.Exception"></exception>
104
118
                public virtual void TestMergeSuccessAllStrategies(MergeStrategy mergeStrategy)
105
119
                {
106
120
                        Git git = new Git(db);
 
121
@@ -1065,7 +1064,7 @@ namespace NGit.Api
 
122
                                , db.ReadSquashCommitMsg());
 
123
                        NUnit.Framework.Assert.IsNull(db.ReadMergeCommitMsg());
 
124
                        Status stat = git.Status().Call();
 
125
-                       NUnit.Framework.Assert.AreEqual(StatusCommandTest.Set("file2", "file3"), stat.GetAdded
 
126
+                       NUnit.Framework.CollectionAssert.AreEquivalent(StatusCommandTest.Set(new [] { "file2", "file3" }), stat.GetAdded
 
127
                                ());
 
128
                }
 
129
 
 
130
@@ -1108,7 +1107,7 @@ namespace NGit.Api
 
131
                                .GetAuthorIdent()) + "\n\n\tthird commit\n", db.ReadSquashCommitMsg());
 
132
                        NUnit.Framework.Assert.IsNull(db.ReadMergeCommitMsg());
 
133
                        Status stat = git.Status().Call();
 
134
-                       NUnit.Framework.Assert.AreEqual(StatusCommandTest.Set("file3"), stat.GetAdded());
 
135
+                       NUnit.Framework.CollectionAssert.AreEquivalent(StatusCommandTest.Set("file3"), stat.GetAdded());
 
136
                }
 
137
 
 
138
                /// <exception cref="System.Exception"></exception>
 
139
@@ -1147,7 +1146,7 @@ namespace NGit.Api
 
140
                        NUnit.Framework.Assert.AreEqual("\nConflicts:\n\tfile2\n", db.ReadMergeCommitMsg(
 
141
                                ));
 
142
                        Status stat = git.Status().Call();
 
143
-                       NUnit.Framework.Assert.AreEqual(StatusCommandTest.Set("file2"), stat.GetConflicting
 
144
+                       NUnit.Framework.CollectionAssert.AreEquivalent(StatusCommandTest.Set("file2"), stat.GetConflicting
 
145
                                ());
 
146
                }
 
147
 
107
148
diff --git a/NGit.Test/NGit.Api/RebaseCommandTest.cs b/NGit.Test/NGit.Api/RebaseCommandTest.cs
108
 
index 86c896f..d44cd75 100644
 
149
index 1e338ca..d8ba6ca 100644
109
150
--- a/NGit.Test/NGit.Api/RebaseCommandTest.cs
110
151
+++ b/NGit.Test/NGit.Api/RebaseCommandTest.cs
111
 
@@ -776,9 +776,14 @@ namespace NGit.Api
 
152
@@ -778,9 +778,14 @@ namespace NGit.Api
112
153
                                sb.Append(line);
113
154
                                sb.Append('\n');
114
155
                        }
124
165
                /// <exception cref="System.Exception"></exception>
125
166
                [NUnit.Framework.Test]
126
167
                public virtual void TestStopOnConflictFileCreationAndDeletion()
 
168
diff --git a/NGit.Test/NGit.Api/RenameBranchCommandTest.cs b/NGit.Test/NGit.Api/RenameBranchCommandTest.cs
 
169
index 2c0a8ef..0ef72c5 100644
 
170
--- a/NGit.Test/NGit.Api/RenameBranchCommandTest.cs
 
171
+++ b/NGit.Test/NGit.Api/RenameBranchCommandTest.cs
 
172
@@ -127,7 +127,7 @@ namespace NGit.Api
 
173
                        config.Save();
 
174
                        NUnit.Framework.Assert.IsNotNull(git.BranchRename().SetNewName(branch).Call());
 
175
                        config = git.GetRepository().GetConfig();
 
176
-                       Assert.AssertArrayEquals(new string[] { "b", "a" }, config.GetStringList(ConfigConstants
 
177
+                       CollectionAssert.AreEquivalent(new string[] { "b", "a" }, config.GetStringList(ConfigConstants
 
178
                                .CONFIG_BRANCH_SECTION, branch, "a"));
 
179
                }
 
180
 
127
181
diff --git a/NGit.Test/NGit.Api/StatusCommandTest.cs b/NGit.Test/NGit.Api/StatusCommandTest.cs
128
 
index e564970..836dba0 100644
 
182
index 3f8612b..357ab82 100644
129
183
--- a/NGit.Test/NGit.Api/StatusCommandTest.cs
130
184
+++ b/NGit.Test/NGit.Api/StatusCommandTest.cs
131
 
@@ -77,12 +77,12 @@ namespace NGit.Api
 
185
@@ -78,12 +78,12 @@ namespace NGit.Api
132
186
                        WriteTrashFile("c", "content of c");
133
187
                        git.Add().AddFilepattern("a").AddFilepattern("b").Call();
134
188
                        Status stat = git.Status().Call();
143
197
                        git.Commit().SetMessage("initial").Call();
144
198
                        WriteTrashFile("a", "modified content of a");
145
199
                        WriteTrashFile("b", "modified content of b");
146
 
@@ -90,12 +90,12 @@ namespace NGit.Api
 
200
@@ -91,12 +91,12 @@ namespace NGit.Api
147
201
                        git.Add().AddFilepattern("a").AddFilepattern("d").Call();
148
202
                        WriteTrashFile("a", "again modified content of a");
149
203
                        stat = git.Status().Call();
153
207
+                       NUnit.Framework.Assert.AreEqual(Set("a"), Set (stat.GetChanged()));
154
208
                        NUnit.Framework.Assert.AreEqual(0, stat.GetMissing().Count);
155
209
-                       NUnit.Framework.Assert.AreEqual(Set("b", "a"), stat.GetModified());
156
 
+                       NUnit.Framework.Assert.AreEqual(Set("b", "a"), Set (stat.GetModified()));
 
210
+                       NUnit.Framework.CollectionAssert.AreEquivalent(Set("b", "a"), Set (stat.GetModified()));
157
211
                        NUnit.Framework.Assert.AreEqual(0, stat.GetRemoved().Count);
158
212
-                       NUnit.Framework.Assert.AreEqual(Set("c"), stat.GetUntracked());
159
213
+                       NUnit.Framework.Assert.AreEqual(Set("c"), Set (stat.GetUntracked()));
160
214
                        git.Add().AddFilepattern(".").Call();
161
215
                        git.Commit().SetMessage("second").Call();
162
216
                        stat = git.Status().Call();
163
 
@@ -115,19 +115,53 @@ namespace NGit.Api
 
217
@@ -116,19 +116,63 @@ namespace NGit.Api
164
218
                        NUnit.Framework.Assert.AreEqual(0, stat.GetChanged().Count);
165
219
                        NUnit.Framework.Assert.AreEqual(0, stat.GetMissing().Count);
166
220
                        NUnit.Framework.Assert.AreEqual(0, stat.GetModified().Count);
172
226
                }
173
227
 
174
228
-               public static ICollection<string> Set(params string[] elements)
175
 
+               static StringSet Set(params string[] elements)
 
229
+               public static StringSet Set(params string[] elements)
176
230
                {
177
231
-                       ICollection<string> ret = new HashSet<string>();
178
232
-                       foreach (string element in elements)
179
233
+                       return new StringSet (elements);
180
234
+               }
181
235
+               
182
 
+               static StringSet Set(IEnumerable<string> elements)
 
236
+               public static StringSet Set(IEnumerable<string> elements)
183
237
+               {
184
238
+                       return new StringSet (elements);
185
239
+               }
186
240
+               
187
 
+               class StringSet
 
241
+               public class StringSet : IEnumerable<string>
188
242
+               {
189
 
+                       HashSet<string> sset = new HashSet<string> ();
190
 
+                       
 
243
+                       HashSet<string> sset;
 
244
+
191
245
+                       public StringSet (IEnumerable<string> s)
192
246
+                       {
193
 
+                               sset.UnionWith (s);
194
 
+                       }
195
 
+                       
 
247
+                               sset = new HashSet<string>(s);
 
248
+                       }
 
249
+
 
250
+                       System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
 
251
+                       {
 
252
+                               return sset.GetEnumerator ();
 
253
+                       }
 
254
+
 
255
+                       IEnumerator<string> IEnumerable<string>.GetEnumerator ()
 
256
+                       {
 
257
+                               return sset.GetEnumerator ();
 
258
+                       }
 
259
+
196
260
+                       public override bool Equals (object obj)
197
261
+                       {
198
262
+                               StringSet s = obj as StringSet;
406
470
                        string expected = "diff --git a/folder/folder.txt b/folder/folder.txt\n" + "index 0119635..95c4c65 100644\n"
407
471
                                 + "--- a/folder/folder.txt\n" + "+++ b/folder/folder.txt\n" + "@@ -1 +1 @@\n" +
408
472
                                 "-folder\n" + "\\ No newline at end of file\n" + "+folder change\n" + "\\ No newline at end of file\n";
409
 
diff --git a/NGit.Test/NGit.Diff/EditListTest.cs b/NGit.Test/NGit.Diff/EditListTest.cs
410
 
index 813e9dd..5989194 100644
411
 
--- a/NGit.Test/NGit.Diff/EditListTest.cs
412
 
+++ b/NGit.Test/NGit.Diff/EditListTest.cs
413
 
@@ -55,7 +55,7 @@ namespace NGit.Diff
414
 
                        EditList l = new EditList();
415
 
                        NUnit.Framework.Assert.AreEqual(0, l.Count);
416
 
                        NUnit.Framework.Assert.IsTrue(l.IsEmpty());
417
 
-                       NUnit.Framework.Assert.AreEqual("EditList[]", l.ToString());
418
 
+//                     NUnit.Framework.Assert.AreEqual("EditList[]", l.ToString());
419
 
                        NUnit.Framework.Assert.IsTrue(l.Equals(l));
420
 
                        NUnit.Framework.Assert.IsTrue(l.Equals(new EditList()));
421
 
                        NUnit.Framework.Assert.IsFalse(l.Equals(string.Empty));
422
473
diff --git a/NGit.Test/NGit.Diff/HistogramDiffTest.cs b/NGit.Test/NGit.Diff/HistogramDiffTest.cs
423
474
index 6444bbb..44cbd35 100644
424
475
--- a/NGit.Test/NGit.Diff/HistogramDiffTest.cs
488
539
                        }
489
540
                }
490
541
 
 
542
diff --git a/NGit.Test/NGit.Dircache/DirCacheCGitCompatabilityTest.cs b/NGit.Test/NGit.Dircache/DirCacheCGitCompatabilityTest.cs
 
543
index f864efa..e6ac028 100644
 
544
--- a/NGit.Test/NGit.Dircache/DirCacheCGitCompatabilityTest.cs
 
545
+++ b/NGit.Test/NGit.Dircache/DirCacheCGitCompatabilityTest.cs
 
546
@@ -223,7 +223,7 @@ namespace NGit.Dircache
 
547
                        dc.WriteTo(bos);
 
548
                        byte[] indexBytes = bos.ToByteArray();
 
549
                        byte[] expectedBytes = IOUtil.ReadFully(file);
 
550
-                       Assert.AssertArrayEquals(expectedBytes, indexBytes);
 
551
+                       CollectionAssert.AreEquivalent(expectedBytes, indexBytes);
 
552
                }
 
553
 
 
554
                private static void AssertV3TreeEntry(int indexPosition, string path, bool skipWorkTree
 
555
@@ -231,8 +231,8 @@ namespace NGit.Dircache
 
556
                {
 
557
                        DirCacheEntry entry = dc.GetEntry(indexPosition);
 
558
                        NUnit.Framework.Assert.AreEqual(path, entry.PathString);
 
559
-                       Assert.AssertEquals(skipWorkTree, entry.IsSkipWorkTree);
 
560
-                       Assert.AssertEquals(intentToAdd, entry.IsIntentToAdd);
 
561
+                       Assert.AreEqual(skipWorkTree, entry.IsSkipWorkTree);
 
562
+                       Assert.AreEqual(intentToAdd, entry.IsIntentToAdd);
 
563
                }
 
564
 
 
565
                private FilePath PathOf(string name)
491
566
diff --git a/NGit.Test/NGit.Dircache/DirCacheFindTest.cs b/NGit.Test/NGit.Dircache/DirCacheFindTest.cs
492
567
index ede0cf7..fc40635 100644
493
568
--- a/NGit.Test/NGit.Dircache/DirCacheFindTest.cs
511
586
                                        NUnit.Framework.Assert.AreSame(ents[i_3], aContents[j]);
512
587
                                }
513
588
diff --git a/NGit.Test/NGit.Fnmatch/FileNameMatcherTest.cs b/NGit.Test/NGit.Fnmatch/FileNameMatcherTest.cs
514
 
index 0be32d3..c2a6001 100644
 
589
index 94cf79d..83deca1 100644
515
590
--- a/NGit.Test/NGit.Fnmatch/FileNameMatcherTest.cs
516
591
+++ b/NGit.Test/NGit.Fnmatch/FileNameMatcherTest.cs
517
 
@@ -523,7 +523,7 @@ namespace NGit.Fnmatch
 
592
@@ -45,6 +45,7 @@ using NGit.Errors;
 
593
 using NGit.Fnmatch;
 
594
 using NGit.Junit;
 
595
 using Sharpen;
 
596
+using NUnit.Framework;
 
597
 
 
598
 namespace NGit.Fnmatch
 
599
 {
 
600
@@ -57,8 +58,8 @@ namespace NGit.Fnmatch
 
601
                {
 
602
                        FileNameMatcher matcher = new FileNameMatcher(pattern, null);
 
603
                        matcher.Append(input);
 
604
-                       Assert.AssertEquals(matchExpected, matcher.IsMatch());
 
605
-                       Assert.AssertEquals(appendCanMatchExpected, matcher.CanAppendMatch());
 
606
+                       Assert.AreEqual(matchExpected, matcher.IsMatch());
 
607
+                       Assert.AreEqual(appendCanMatchExpected, matcher.CanAppendMatch());
 
608
                }
 
609
 
 
610
                /// <exception cref="NGit.Errors.InvalidPatternException"></exception>
 
611
@@ -67,8 +68,8 @@ namespace NGit.Fnmatch
 
612
                {
 
613
                        FileNameMatcher matcher = new FileNameMatcher(pattern, excludedCharacter);
 
614
                        matcher.Append(input);
 
615
-                       Assert.AssertEquals(matchExpected, matcher.IsMatch());
 
616
-                       Assert.AssertEquals(appendCanMatchExpected, matcher.CanAppendMatch());
 
617
+                       Assert.AreEqual(matchExpected, matcher.IsMatch());
 
618
+                       Assert.AreEqual(appendCanMatchExpected, matcher.CanAppendMatch());
 
619
                }
 
620
 
 
621
                /// <exception cref="System.Exception"></exception>
 
622
@@ -524,7 +525,7 @@ namespace NGit.Fnmatch
518
623
                [NUnit.Framework.Test]
519
624
                public virtual void TestCntrlGroupCase1()
520
625
                {
523
628
                }
524
629
 
525
630
                /// <exception cref="System.Exception"></exception>
 
631
diff --git a/NGit.Test/NGit.Ignore/IgnoreNodeTest.cs b/NGit.Test/NGit.Ignore/IgnoreNodeTest.cs
 
632
index 6a9766f..882234e 100644
 
633
--- a/NGit.Test/NGit.Ignore/IgnoreNodeTest.cs
 
634
+++ b/NGit.Test/NGit.Ignore/IgnoreNodeTest.cs
 
635
@@ -172,7 +172,7 @@ namespace NGit.Ignore
 
636
                        NUnit.Framework.Assert.AreEqual(type, walk.GetFileMode(0));
 
637
                        WorkingTreeIterator itr = walk.GetTree<WorkingTreeIterator>(0);
 
638
                        NUnit.Framework.Assert.IsNotNull(itr, "has tree");
 
639
-                       Assert.AssertEquals("is ignored", entryIgnored, itr.IsEntryIgnored());
 
640
+                       NUnit.Framework.Assert.AreEqual(entryIgnored, itr.IsEntryIgnored(), "is ignored");
 
641
                        if (D.Equals(type))
 
642
                        {
 
643
                                walk.EnterSubtree();
526
644
diff --git a/NGit.Test/NGit.Junit/JGitTestUtil.cs b/NGit.Test/NGit.Junit/JGitTestUtil.cs
527
 
index 6f5cdeb..8ca1edb 100644
 
645
index 7a32071..49a7b8c 100644
528
646
--- a/NGit.Test/NGit.Junit/JGitTestUtil.cs
529
647
+++ b/NGit.Test/NGit.Junit/JGitTestUtil.cs
530
648
@@ -49,6 +49,7 @@ using NGit.Storage.File;
585
703
 
586
704
                /// <exception cref="System.IO.IOException"></exception>
587
705
diff --git a/NGit.Test/NGit.Junit/LocalDiskRepositoryTestCase.cs b/NGit.Test/NGit.Junit/LocalDiskRepositoryTestCase.cs
588
 
index 24732ce..f23181a 100644
 
706
index 4ae6566..2992eeb 100644
589
707
--- a/NGit.Test/NGit.Junit/LocalDiskRepositoryTestCase.cs
590
708
+++ b/NGit.Test/NGit.Junit/LocalDiskRepositoryTestCase.cs
591
709
@@ -224,7 +224,7 @@ namespace NGit.Junit
626
744
 
627
745
                public override string GetHostname()
628
746
diff --git a/NGit.Test/NGit.Junit/TestRepository.cs b/NGit.Test/NGit.Junit/TestRepository.cs
629
 
index dbe0201..f9828e0 100644
 
747
index be34f54..937373a 100644
630
748
--- a/NGit.Test/NGit.Junit/TestRepository.cs
631
749
+++ b/NGit.Test/NGit.Junit/TestRepository.cs
632
 
@@ -63,7 +63,27 @@ namespace NGit.Junit
 
750
@@ -63,7 +63,28 @@ namespace NGit.Junit
633
751
        /// <summary>Wrapper to make creating test data easier.</summary>
634
752
        /// <remarks>Wrapper to make creating test data easier.</remarks>
635
753
        /// <?></?>
652
770
+               T Update<T>(string @ref, T obj) where T:AnyObjectId;
653
771
+               void WriteFile(FilePath p, byte[] bin);
654
772
+               RevBlob Blob(string content);
 
773
+               RevBlob Blob(byte[] content);
655
774
+       }
656
775
+       
657
776
+       public class TestRepository<R> : TestRepository where R : Repository
658
777
        {
659
778
                private static readonly PersonIdent author;
660
779
 
661
 
@@ -81,12 +101,21 @@ namespace NGit.Junit
 
780
@@ -81,12 +102,21 @@ namespace NGit.Junit
662
781
                        string ce = "jcommitter@example.com";
663
782
                        committer = new PersonIdent(cn, ce, now, tz);
664
783
                }
669
788
+                       set { storage = value; }
670
789
+               }
671
790
+               
672
 
+               private R db {
 
791
+               private Repository db {
673
792
+                       get { return (R) (object) storage; }
674
793
+                       set { storage = (Repository)(object) value; }
675
794
+               }
684
803
 
685
804
                private long now;
686
805
 
687
 
@@ -342,7 +371,7 @@ namespace NGit.Junit
 
806
@@ -112,7 +142,7 @@ namespace NGit.Junit
 
807
                }
 
808
 
 
809
                /// <returns>the repository this helper class operates against.</returns>
 
810
-               public virtual R GetRepository()
 
811
+               public virtual Repository GetRepository()
 
812
                {
 
813
                        return db;
 
814
                }
 
815
@@ -342,7 +372,7 @@ namespace NGit.Junit
688
816
                        NGit.CommitBuilder c;
689
817
                        c = new NGit.CommitBuilder();
690
818
                        c.TreeId = tree;
693
821
                        c.Author = new PersonIdent(author, Sharpen.Extensions.CreateDate(now));
694
822
                        c.Committer = new PersonIdent(committer, Sharpen.Extensions.CreateDate(now));
695
823
                        c.Message = string.Empty;
696
 
@@ -360,9 +389,9 @@ namespace NGit.Junit
 
824
@@ -360,9 +390,9 @@ namespace NGit.Junit
697
825
                }
698
826
 
699
827
                /// <returns>a new commit builder.</returns>
705
833
                }
706
834
 
707
835
                /// <summary>Construct an annotated tag object pointing at another object.</summary>
708
 
@@ -426,7 +455,7 @@ namespace NGit.Junit
 
836
@@ -426,7 +456,7 @@ namespace NGit.Junit
709
837
                /// <param name="to">the target object.</param>
710
838
                /// <returns>the target object.</returns>
711
839
                /// <exception cref="System.Exception">System.Exception</exception>
714
842
                {
715
843
                        return Update(@ref, to.Create());
716
844
                }
717
 
@@ -508,7 +537,7 @@ namespace NGit.Junit
718
 
                {
719
 
                        if (db is FileRepository)
720
 
                        {
721
 
-                               FileRepository fr = (FileRepository)db;
722
 
+                               FileRepository fr = (FileRepository)(object)db;
723
 
                                RefWriter rw = new _RefWriter_491(this, fr, fr.GetAllRefs().Values);
724
 
                                rw.WritePackedRefs();
725
 
                                rw.WriteInfoRefs();
726
 
@@ -534,13 +563,13 @@ namespace NGit.Junit
 
845
@@ -538,13 +568,13 @@ namespace NGit.Junit
727
846
                        }
728
847
 
729
848
                        /// <exception cref="System.IO.IOException"></exception>
740
859
 
741
860
                        private readonly FileRepository fr;
742
861
                }
743
 
@@ -577,7 +606,7 @@ namespace NGit.Junit
 
862
@@ -581,7 +611,7 @@ namespace NGit.Junit
744
863
                /// be added.
745
864
                /// </param>
746
865
                /// <returns>builder for the named branch.</returns>
749
868
                {
750
869
                        if (Constants.HEAD.Equals(@ref))
751
870
                        {
752
 
@@ -592,7 +621,7 @@ namespace NGit.Junit
 
871
@@ -598,7 +628,7 @@ namespace NGit.Junit
753
872
                                        @ref = Constants.R_HEADS + @ref;
754
873
                                }
755
874
                        }
757
876
+                       return new BranchBuilder(this, @ref);
758
877
                }
759
878
 
760
 
                /// <summary>Run consistency checks against the object database.</summary>
761
 
@@ -744,7 +773,7 @@ namespace NGit.Junit
 
879
                /// <summary>Tag an object using a lightweight tag.</summary>
 
880
@@ -768,7 +798,7 @@ namespace NGit.Junit
762
881
 
763
882
                /// <exception cref="System.IO.IOException"></exception>
764
883
                /// <exception cref="NGit.Errors.ObjectWritingException"></exception>
767
886
                {
768
887
                        LockFile lck = new LockFile(p, db.FileSystem);
769
888
                        if (!lck.Lock())
770
 
@@ -764,13 +793,13 @@ namespace NGit.Junit
 
889
@@ -788,13 +818,13 @@ namespace NGit.Junit
771
890
                                throw new ObjectWritingException("Can't write " + p);
772
891
                        }
773
892
                }
784
903
                        {
785
904
                                this._enclosing = _enclosing;
786
905
                                this.@ref = @ref;
787
 
@@ -784,9 +813,9 @@ namespace NGit.Junit
 
906
@@ -808,9 +838,9 @@ namespace NGit.Junit
788
907
                        /// </returns>
789
908
                        /// <exception cref="System.Exception">the commit builder can't read the current branch state
790
909
                        ///     </exception>
796
915
                        }
797
916
 
798
917
                        /// <summary>Forcefully update this branch to a particular commit.</summary>
799
 
@@ -798,7 +827,7 @@ namespace NGit.Junit
 
918
@@ -822,7 +852,7 @@ namespace NGit.Junit
800
919
                        /// .
801
920
                        /// </returns>
802
921
                        /// <exception cref="System.Exception">System.Exception</exception>
805
924
                        {
806
925
                                return this.Update(to.Create());
807
926
                        }
808
 
@@ -814,17 +843,17 @@ namespace NGit.Junit
 
927
@@ -838,17 +868,17 @@ namespace NGit.Junit
809
928
                        /// <exception cref="System.Exception">System.Exception</exception>
810
929
                        public virtual RevCommit Update(RevCommit to)
811
930
                        {
826
945
 
827
946
                        private readonly DirCache tree = DirCache.NewInCore();
828
947
 
829
 
@@ -836,14 +865,14 @@ namespace NGit.Junit
 
948
@@ -862,14 +892,14 @@ namespace NGit.Junit
830
949
 
831
950
                        private RevCommit self;
832
951
 
843
962
                                 b)
844
963
                        {
845
964
                                this._enclosing = _enclosing;
846
 
@@ -856,7 +885,7 @@ namespace NGit.Junit
 
965
@@ -882,7 +912,7 @@ namespace NGit.Junit
847
966
                        }
848
967
 
849
968
                        /// <exception cref="System.Exception"></exception>
852
971
                                 prior)
853
972
                        {
854
973
                                this._enclosing = _enclosing;
855
 
@@ -871,7 +900,7 @@ namespace NGit.Junit
 
974
@@ -897,7 +927,7 @@ namespace NGit.Junit
856
975
                        }
857
976
 
858
977
                        /// <exception cref="System.Exception"></exception>
861
980
                        {
862
981
                                if (this.parents.IsEmpty())
863
982
                                {
864
 
@@ -885,26 +914,26 @@ namespace NGit.Junit
 
983
@@ -911,32 +941,32 @@ namespace NGit.Junit
865
984
                                return this;
866
985
                        }
867
986
 
879
998
                                return this;
880
999
                        }
881
1000
 
 
1001
-                       public virtual TestRepository.CommitBuilder SetTopLevelTree(ObjectId treeId)
 
1002
+                       public virtual CommitBuilder SetTopLevelTree(ObjectId treeId)
 
1003
                        {
 
1004
                                this.topLevelTree = treeId;
 
1005
                                return this;
 
1006
                        }
 
1007
 
882
1008
                        /// <exception cref="System.Exception"></exception>
883
1009
-                       public virtual TestRepository.CommitBuilder Add(string path, string content)
884
1010
+                       public virtual CommitBuilder Add(string path, string content)
890
1016
-                       public virtual TestRepository.CommitBuilder Add(string path, RevBlob id)
891
1017
+                       public virtual CommitBuilder Add(string path, RevBlob id)
892
1018
                        {
893
 
                                DirCacheEditor e = this.tree.Editor();
894
 
                                e.Add(new _PathEdit_791(id, path));
895
 
@@ -928,7 +957,7 @@ namespace NGit.Junit
 
1019
                                return this.Edit(new _PathEdit_820(id, path));
 
1020
                        }
 
1021
@@ -957,7 +987,7 @@ namespace NGit.Junit
896
1022
                                private readonly RevBlob id;
897
1023
                        }
898
1024
 
 
1025
-                       public virtual TestRepository.CommitBuilder Edit(DirCacheEditor.PathEdit edit)
 
1026
+               public virtual CommitBuilder Edit(NGit.Dircache.DirCacheEditor.PathEdit edit)
 
1027
                        {
 
1028
                                DirCacheEditor e = this.tree.Editor();
 
1029
                                e.Add(edit);
 
1030
@@ -965,7 +995,7 @@ namespace NGit.Junit
 
1031
                                return this;
 
1032
                        }
 
1033
 
899
1034
-                       public virtual TestRepository.CommitBuilder Rm(string path)
900
1035
+                       public virtual CommitBuilder Rm(string path)
901
1036
                        {
902
1037
                                DirCacheEditor e = this.tree.Editor();
903
1038
                                e.Add(new DirCacheEditor.DeletePath(path));
904
 
@@ -937,13 +966,13 @@ namespace NGit.Junit
 
1039
@@ -974,13 +1004,13 @@ namespace NGit.Junit
905
1040
                                return this;
906
1041
                        }
907
1042
 
917
1052
                        {
918
1053
                                this.tick = secs;
919
1054
                                return this;
920
 
@@ -954,7 +983,7 @@ namespace NGit.Junit
 
1055
@@ -991,7 +1021,7 @@ namespace NGit.Junit
921
1056
                        {
922
1057
                                if (this.self == null)
923
1058
                                {
926
1061
                                        NGit.CommitBuilder c;
927
1062
                                        c = new NGit.CommitBuilder();
928
1063
                                        c.SetParentIds(this.parents);
929
 
@@ -981,12 +1010,12 @@ namespace NGit.Junit
 
1064
@@ -1025,12 +1055,12 @@ namespace NGit.Junit
930
1065
                        }
931
1066
 
932
1067
                        /// <exception cref="System.Exception"></exception>
956
1091
                                ), RT(ours), RT(theirs));
957
1092
                        ByteArrayOutputStream bo = new ByteArrayOutputStream(50);
958
1093
                        fmt.FormatMerge(bo, r, "B", "O", "T", Constants.CHARACTER_ENCODING);
 
1094
diff --git a/NGit.Test/NGit.Merge/ResolveMergerTest.cs b/NGit.Test/NGit.Merge/ResolveMergerTest.cs
 
1095
index 184cce4..4243c1d 100644
 
1096
--- a/NGit.Test/NGit.Merge/ResolveMergerTest.cs
 
1097
+++ b/NGit.Test/NGit.Merge/ResolveMergerTest.cs
 
1098
@@ -49,14 +49,13 @@ using NGit.Revwalk;
 
1099
 using NGit.Treewalk;
 
1100
 using NGit.Util;
 
1101
 using NUnit.Framework;
 
1102
-using NUnit.Framework.Experimental.Theories;
 
1103
 using Sharpen;
 
1104
 
 
1105
 namespace NGit.Merge
 
1106
 {
 
1107
        public class ResolveMergerTest : RepositoryTestCase
 
1108
        {
 
1109
-               [DataPoint]
 
1110
+               [Datapoint]
 
1111
                public static MergeStrategy resolve = MergeStrategy.RESOLVE;
 
1112
 
 
1113
                /// <exception cref="System.Exception"></exception>
 
1114
@@ -511,12 +510,13 @@ namespace NGit.Merge
 
1115
                private void CheckModificationTimeStampOrder(params string[] pathes)
 
1116
                {
 
1117
                        long lastMod = long.MinValue;
 
1118
-                       foreach (string p in pathes)
 
1119
+                       foreach (string pp in pathes)
 
1120
                        {
 
1121
+                               var p = pp;
 
1122
                                bool strong = p.StartsWith("<");
 
1123
-                               bool fixed = p[strong ? 1 : 0] == '*';
 
1124
-                               p = Sharpen.Runtime.Substring(p, (strong ? 1 : 0) + (fixed ? 1 : 0));
 
1125
-                               long curMod = fixed ? Sharpen.Extensions.ValueOf(p) : new FilePath(db.WorkTree, p
 
1126
+                               bool @fixed = p[strong ? 1 : 0] == '*';
 
1127
+                               p = Sharpen.Runtime.Substring(p, (strong ? 1 : 0) + (@fixed ? 1 : 0));
 
1128
+                               long curMod = @fixed ? long.Parse(p) : new FilePath(db.WorkTree, p
 
1129
                                        ).LastModified();
 
1130
                                if (strong)
 
1131
                                {
959
1132
diff --git a/NGit.Test/NGit.Nls/NLSTest.cs b/NGit.Test/NGit.Nls/NLSTest.cs
960
1133
index b7e4df5..7dff5a2 100644
961
1134
--- a/NGit.Test/NGit.Nls/NLSTest.cs
1213
1386
                {
1214
1387
                        return util.Commit();
1215
1388
                }
 
1389
diff --git a/NGit.Test/NGit.Storage.File/ConcurrentRepackTest.cs b/NGit.Test/NGit.Storage.File/ConcurrentRepackTest.cs
 
1390
index 42914ff..5fb1561 100644
 
1391
--- a/NGit.Test/NGit.Storage.File/ConcurrentRepackTest.cs
 
1392
+++ b/NGit.Test/NGit.Storage.File/ConcurrentRepackTest.cs
 
1393
@@ -181,7 +181,7 @@ namespace NGit.Storage.File
 
1394
                        NUnit.Framework.Assert.IsNotNull(data1);
 
1395
                        NUnit.Framework.Assert.AreNotSame(data1, data2);
 
1396
                        // cache should be per-pack, not per object
 
1397
-                       Assert.AssertArrayEquals(data1, data2);
 
1398
+                       CollectionAssert.AreEquivalent(data1, data2);
 
1399
                        NUnit.Framework.Assert.AreEqual(load2.GetType(), load1.GetType());
 
1400
                }
 
1401
 
 
1402
diff --git a/NGit.Test/NGit.Storage.File/GCTest.cs b/NGit.Test/NGit.Storage.File/GCTest.cs
 
1403
index 0706615..9ccca84 100644
 
1404
--- a/NGit.Test/NGit.Storage.File/GCTest.cs
 
1405
+++ b/NGit.Test/NGit.Storage.File/GCTest.cs
 
1406
@@ -183,7 +183,7 @@ namespace NGit.Storage.File
 
1407
                        {
 
1408
                                Future<RefUpdate.Result> result = pool.Submit(new _Callable_185(this, b, refUpdateLockedRef
 
1409
                                        , packRefsDone));
 
1410
-                               pool.Submit(new _Callable_210(this, refUpdateLockedRef, packRefsDone));
 
1411
+                               pool.Submit<object>(new _Callable_210(this, refUpdateLockedRef, packRefsDone));
 
1412
                                NUnit.Framework.Assert.AreEqual(result.Get(), RefUpdate.Result.FORCED);
 
1413
                        }
 
1414
                        finally
 
1415
@@ -236,10 +236,6 @@ namespace NGit.Storage.File
 
1416
                                        {
 
1417
                                                Sharpen.Thread.CurrentThread().Interrupt();
 
1418
                                        }
 
1419
-                                       catch (BrokenBarrierException)
 
1420
-                                       {
 
1421
-                                               Sharpen.Thread.CurrentThread().Interrupt();
 
1422
-                                       }
 
1423
                                        return base.IsForceUpdate();
 
1424
                                }
 
1425
 
 
1426
@@ -257,7 +253,7 @@ namespace NGit.Storage.File
 
1427
                        private readonly CyclicBarrier packRefsDone;
 
1428
                }
 
1429
 
 
1430
-               private sealed class _Callable_210 : Callable<Void>
 
1431
+               private sealed class _Callable_210 : Callable<object>
 
1432
                {
 
1433
                        public _Callable_210(GCTest _enclosing, CyclicBarrier refUpdateLockedRef, CyclicBarrier
 
1434
                                 packRefsDone)
 
1435
@@ -268,7 +264,7 @@ namespace NGit.Storage.File
 
1436
                        }
 
1437
 
 
1438
                        /// <exception cref="System.Exception"></exception>
 
1439
-                       public Void Call()
 
1440
+                       public object Call()
 
1441
                        {
 
1442
                                refUpdateLockedRef.Await();
 
1443
                                this._enclosing.gc.PackRefs();
 
1444
@@ -297,22 +293,22 @@ namespace NGit.Storage.File
 
1445
                [NUnit.Framework.Test]
 
1446
                public virtual void ConcurrentRepack()
 
1447
                {
 
1448
-                       CyclicBarrier syncPoint = new CyclicBarrier(2);
 
1449
                        //
 
1450
                        // leave the syncPoint in broken state so any awaiting
 
1451
                        // threads and any threads that call await in the future get
 
1452
                        // the BrokenBarrierException
 
1453
                        //
 
1454
+                       CyclicBarrier syncPoint = new CyclicBarrier(1);
 
1455
                        RevBlob a = tr.Blob("a");
 
1456
                        tr.LightweightTag("t", a);
 
1457
                        ExecutorService pool = Executors.NewFixedThreadPool(2);
 
1458
                        try
 
1459
                        {
 
1460
-                               _T187790690 repack1 = new _T187790690(this);
 
1461
-                               _T187790690 repack2 = new _T187790690(this);
 
1462
+                               _T187790690 repack1 = new _T187790690(this) { syncPoint = syncPoint };
 
1463
+                               //_T187790690 repack2 = new _T187790690(this) { syncPoint = syncPoint };
 
1464
                                Future<int> result1 = pool.Submit(repack1);
 
1465
-                               Future<int> result2 = pool.Submit(repack2);
 
1466
-                               NUnit.Framework.Assert.AreEqual(0, result1.Get() + result2.Get());
 
1467
+                               //Future<int> result2 = pool.Submit(repack2);
 
1468
+                               NUnit.Framework.Assert.AreEqual(0, result1.Get());// + result2.Get());
 
1469
                        }
 
1470
                        finally
 
1471
                        {
 
1472
@@ -323,6 +319,7 @@ namespace NGit.Storage.File
 
1473
 
 
1474
                internal class _T187790690 : EmptyProgressMonitor, Callable<int>
 
1475
                {
 
1476
+                       public CyclicBarrier syncPoint;
 
1477
                        public override void BeginTask(string title, int totalWork)
 
1478
                        {
 
1479
                                if (title.Equals(JGitText.Get().writingObjects))
 
1480
@@ -335,9 +332,6 @@ namespace NGit.Storage.File
 
1481
                                        {
 
1482
                                                Sharpen.Thread.CurrentThread().Interrupt();
 
1483
                                        }
 
1484
-                                       catch (BrokenBarrierException)
 
1485
-                                       {
 
1486
-                                       }
 
1487
                                }
 
1488
                        }
 
1489
 
 
1490
@@ -489,7 +483,7 @@ namespace NGit.Storage.File
 
1491
                        Merger merger = ((ThreeWayMerger)MergeStrategy.SIMPLE_TWO_WAY_IN_CORE.NewMerger(repo
 
1492
                                ));
 
1493
                        merger.Merge(b1Tip, b2Tip);
 
1494
-                       TestRepository.CommitBuilder cb = tr.Commit();
 
1495
+                       NGit.Junit.CommitBuilder cb = tr.Commit();
 
1496
                        cb.Parent(b1Tip).Parent(b2Tip);
 
1497
                        cb.SetTopLevelTree(merger.GetResultTreeId());
 
1498
                        RevCommit mergeCommit = cb.Create();
 
1499
@@ -523,7 +517,7 @@ namespace NGit.Storage.File
 
1500
                [NUnit.Framework.Test]
 
1501
                public virtual void TestKeepFiles()
 
1502
                {
 
1503
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1504
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1505
                        bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1506
                        stats = gc.GetStatistics();
 
1507
                        NUnit.Framework.Assert.AreEqual(4, stats.numberOfLooseObjects);
 
1508
@@ -587,7 +581,7 @@ namespace NGit.Storage.File
 
1509
                [NUnit.Framework.Test]
 
1510
                public virtual void TestPack2Commits()
 
1511
                {
 
1512
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1513
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1514
                        bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1515
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1516
                        stats = gc.GetStatistics();
 
1517
@@ -604,7 +598,7 @@ namespace NGit.Storage.File
 
1518
                [NUnit.Framework.Test]
 
1519
                public virtual void TestPackCommitsAndLooseOne()
 
1520
                {
 
1521
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1522
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1523
                        RevCommit first = bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1524
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1525
                        tr.Update("refs/heads/master", first);
 
1526
@@ -622,7 +616,7 @@ namespace NGit.Storage.File
 
1527
                [NUnit.Framework.Test]
 
1528
                public virtual void TestNotPackTwice()
 
1529
                {
 
1530
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1531
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1532
                        RevCommit first = bb.Commit().Message("M").Add("M", "M").Create();
 
1533
                        bb.Commit().Message("B").Add("B", "Q").Create();
 
1534
                        bb.Commit().Message("A").Add("A", "A").Create();
 
1535
@@ -656,7 +650,7 @@ namespace NGit.Storage.File
 
1536
                [NUnit.Framework.Test]
 
1537
                public virtual void TestPackCommitsAndLooseOneNoReflog()
 
1538
                {
 
1539
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1540
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1541
                        RevCommit first = bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1542
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1543
                        tr.Update("refs/heads/master", first);
 
1544
@@ -678,7 +672,7 @@ namespace NGit.Storage.File
 
1545
                [NUnit.Framework.Test]
 
1546
                public virtual void TestPackCommitsAndLooseOneWithPruneNow()
 
1547
                {
 
1548
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1549
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1550
                        RevCommit first = bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1551
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1552
                        tr.Update("refs/heads/master", first);
 
1553
@@ -697,7 +691,7 @@ namespace NGit.Storage.File
 
1554
                [NUnit.Framework.Test]
 
1555
                public virtual void TestPackCommitsAndLooseOneWithPruneNowNoReflog()
 
1556
                {
 
1557
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1558
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1559
                        RevCommit first = bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1560
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1561
                        tr.Update("refs/heads/master", first);
 
1562
@@ -720,7 +714,7 @@ namespace NGit.Storage.File
 
1563
                [NUnit.Framework.Test]
 
1564
                public virtual void TestIndexSavesObjects()
 
1565
                {
 
1566
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1567
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1568
                        bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1569
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1570
                        bb.Commit().Add("A", "A3");
 
1571
@@ -739,7 +733,7 @@ namespace NGit.Storage.File
 
1572
                [NUnit.Framework.Test]
 
1573
                public virtual void TestIndexSavesObjectsWithPruneNow()
 
1574
                {
 
1575
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1576
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1577
                        bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1578
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1579
                        bb.Commit().Add("A", "A3");
 
1580
@@ -759,7 +753,7 @@ namespace NGit.Storage.File
 
1581
                [NUnit.Framework.Test]
 
1582
                public virtual void TestPruneNone()
 
1583
                {
 
1584
-                       TestRepository.BranchBuilder bb = tr.Branch("refs/heads/master");
 
1585
+                       BranchBuilder bb = tr.Branch("refs/heads/master");
 
1586
                        bb.Commit().Add("A", "A").Add("B", "B").Create();
 
1587
                        bb.Commit().Add("A", "A2").Add("B", "B2").Create();
 
1588
                        new FilePath(repo.Directory, Constants.LOGS + "/refs/heads/master").Delete();
 
1589
@@ -798,7 +792,7 @@ namespace NGit.Storage.File
 
1590
                        {
 
1591
                                throw new ArgumentException("Chain depth must be > 0");
 
1592
                        }
 
1593
-                       TestRepository.CommitBuilder cb = tr.Commit();
 
1594
+                       NGit.Junit.CommitBuilder cb = tr.Commit();
 
1595
                        RevCommit tip;
 
1596
                        do
 
1597
                        {
1216
1598
diff --git a/NGit.Test/NGit.Storage.File/PackFileTest.cs b/NGit.Test/NGit.Storage.File/PackFileTest.cs
1217
 
index 0a39b1a..301e078 100644
 
1599
index 3542af5..b7c1b8d 100644
1218
1600
--- a/NGit.Test/NGit.Storage.File/PackFileTest.cs
1219
1601
+++ b/NGit.Test/NGit.Storage.File/PackFileTest.cs
1220
 
@@ -100,6 +100,7 @@ namespace NGit.Storage.File
 
1602
@@ -101,6 +101,7 @@ namespace NGit.Storage.File
1221
1603
                        }
1222
1604
                        WindowCache.Reconfigure(new WindowCacheConfig());
1223
1605
                        base.TearDown();
1225
1607
                }
1226
1608
 
1227
1609
                /// <exception cref="System.Exception"></exception>
1228
 
@@ -356,12 +357,12 @@ namespace NGit.Storage.File
 
1610
@@ -208,7 +209,7 @@ namespace NGit.Storage.File
 
1611
                        NUnit.Framework.Assert.AreEqual(data3.Length, ol.GetSize());
 
1612
                        NUnit.Framework.Assert.IsFalse(ol.IsLarge(), "is large");
 
1613
                        NUnit.Framework.Assert.IsNotNull(ol.GetCachedBytes());
 
1614
-                       Assert.AssertArrayEquals(data3, ol.GetCachedBytes());
 
1615
+                       CollectionAssert.AreEquivalent(data3, ol.GetCachedBytes());
 
1616
                        ObjectStream @in = ol.OpenStream();
 
1617
                        NUnit.Framework.Assert.IsNotNull(@in, "have stream");
 
1618
                        NUnit.Framework.Assert.AreEqual(Constants.OBJ_BLOB, @in.GetType());
 
1619
@@ -357,12 +358,12 @@ namespace NGit.Storage.File
1229
1620
 
1230
1621
                private ObjectInserter inserter;
1231
1622
 
1239
1630
                        }
1240
1631
                }
1241
1632
 
1242
 
diff --git a/NGit.Test/NGit.Storage.File/RefDirectoryTest.cs b/NGit.Test/NGit.Storage.File/RefDirectoryTest.cs
1243
 
index 84ce0ba..5fd5d09 100644
1244
 
--- a/NGit.Test/NGit.Storage.File/RefDirectoryTest.cs
1245
 
+++ b/NGit.Test/NGit.Storage.File/RefDirectoryTest.cs
1246
 
@@ -74,7 +74,7 @@ namespace NGit.Storage.File
1247
 
                        base.SetUp();
1248
 
                        diskRepo = CreateBareRepository();
1249
 
                        refdir = (RefDirectory)diskRepo.RefDatabase;
1250
 
-                       repo = new TestRepository(diskRepo);
1251
 
+                       repo = new TestRepository<Repository>(diskRepo);
1252
 
                        A = repo.Commit().Create();
1253
 
                        B = repo.Commit(repo.GetRevWalk().ParseCommit(A));
1254
 
                        v1_0 = repo.Tag("v1_0", B);
 
1633
diff --git a/NGit.Test/NGit.Storage.File/PackWriterTest.cs b/NGit.Test/NGit.Storage.File/PackWriterTest.cs
 
1634
index 3d6bd40..642c365 100644
 
1635
--- a/NGit.Test/NGit.Storage.File/PackWriterTest.cs
 
1636
+++ b/NGit.Test/NGit.Storage.File/PackWriterTest.cs
 
1637
@@ -483,7 +483,7 @@ namespace NGit.Storage.File
 
1638
                        FileRepository repo = CreateBareRepository();
 
1639
                        TestRepository<FileRepository> testRepo = new TestRepository<FileRepository>(repo
 
1640
                                );
 
1641
-                       TestRepository.BranchBuilder bb = testRepo.Branch("refs/heads/master");
 
1642
+                       BranchBuilder bb = testRepo.Branch("refs/heads/master");
 
1643
                        RevBlob contentA = testRepo.Blob("A");
 
1644
                        RevCommit c1 = bb.Commit().Add("f", contentA).Create();
 
1645
                        testRepo.GetRevWalk().ParseHeaders(c1);
1255
1646
diff --git a/NGit.Test/NGit.Storage.File/RefUpdateTest.cs b/NGit.Test/NGit.Storage.File/RefUpdateTest.cs
1256
 
index 1a268d6..8de18fb 100644
 
1647
index 13bb0b8..02fb78c 100644
1257
1648
--- a/NGit.Test/NGit.Storage.File/RefUpdateTest.cs
1258
1649
+++ b/NGit.Test/NGit.Storage.File/RefUpdateTest.cs
1259
 
@@ -930,9 +930,9 @@ namespace NGit.Storage.File
 
1650
@@ -92,9 +92,9 @@ namespace NGit.Storage.File
 
1651
                private void Delete(RefUpdate @ref, RefUpdate.Result expected, bool exists, bool 
 
1652
                        removed)
 
1653
                {
 
1654
-                       Assert.AssertEquals(exists, db.GetAllRefs().ContainsKey(@ref.GetName()));
 
1655
+                       NUnit.Framework.Assert.AreEqual(exists, db.GetAllRefs().ContainsKey(@ref.GetName()));
 
1656
                        NUnit.Framework.Assert.AreEqual(expected, @ref.Delete());
 
1657
-                       Assert.AssertEquals(!removed, db.GetAllRefs().ContainsKey(@ref.GetName()));
 
1658
+                       NUnit.Framework.Assert.AreEqual(!removed, db.GetAllRefs().ContainsKey(@ref.GetName()));
 
1659
                }
 
1660
 
 
1661
                /// <exception cref="System.IO.IOException"></exception>
 
1662
@@ -785,8 +785,8 @@ namespace NGit.Storage.File
 
1663
 
 
1664
                private void AssertExists(bool positive, string toName)
 
1665
                {
 
1666
-                       Assert.AssertEquals(toName + (positive ? " " : " does not ") + "exist", positive, 
 
1667
-                               new FilePath(db.Directory, toName).Exists());
 
1668
+                       NUnit.Framework.Assert.AreEqual(positive, 
 
1669
+                                                       new FilePath(db.Directory, toName).Exists(), toName + (positive ? " " : " does not ") + "exist");
 
1670
                }
 
1671
 
 
1672
                /// <exception cref="System.IO.IOException"></exception>
 
1673
@@ -929,9 +929,9 @@ namespace NGit.Storage.File
1260
1674
                }
1261
1675
 
1262
1676
                [System.Serializable]
1294
1708
                {
1295
1709
                }
1296
1710
 
 
1711
diff --git a/NGit.Test/NGit.Storage.Pack/DeltaIndexTest.cs b/NGit.Test/NGit.Storage.Pack/DeltaIndexTest.cs
 
1712
index b2dc836..d2aa159 100644
 
1713
--- a/NGit.Test/NGit.Storage.Pack/DeltaIndexTest.cs
 
1714
+++ b/NGit.Test/NGit.Storage.Pack/DeltaIndexTest.cs
 
1715
@@ -268,7 +268,7 @@ namespace NGit.Storage.Pack
 
1716
                        NUnit.Framework.Assert.IsTrue(actDelta.Length > 0, "delta is not empty");
 
1717
                        NUnit.Framework.Assert.AreEqual(src.Length, BinaryDelta.GetBaseSize(actDelta));
 
1718
                        NUnit.Framework.Assert.AreEqual(dst.Length, BinaryDelta.GetResultSize(actDelta));
 
1719
-                       Assert.AssertArrayEquals(dst, BinaryDelta.Apply(src, actDelta));
 
1720
+                       CollectionAssert.AreEquivalent(dst, BinaryDelta.Apply(src, actDelta));
 
1721
                }
 
1722
        }
 
1723
 }
1297
1724
diff --git a/NGit.Test/NGit.Storage.Pack/DeltaStreamTest.cs b/NGit.Test/NGit.Storage.Pack/DeltaStreamTest.cs
1298
 
index 32cd9e5..148b00c 100644
 
1725
index d3bc878..b6c77f7 100644
1299
1726
--- a/NGit.Test/NGit.Storage.Pack/DeltaStreamTest.cs
1300
1727
+++ b/NGit.Test/NGit.Storage.Pack/DeltaStreamTest.cs
1301
 
@@ -204,13 +204,13 @@ namespace NGit.Storage.Pack
 
1728
@@ -205,13 +205,13 @@ namespace NGit.Storage.Pack
1302
1729
                        }
1303
1730
 
1304
1731
                        /// <exception cref="System.IO.IOException"></exception>
1314
1741
                        {
1315
1742
                                opened[0] = true;
1316
1743
                                return new ByteArrayInputStream(this._enclosing.@base);
1317
 
@@ -259,13 +259,13 @@ namespace NGit.Storage.Pack
 
1744
@@ -260,13 +260,13 @@ namespace NGit.Storage.Pack
1318
1745
                        }
1319
1746
 
1320
1747
                        /// <exception cref="System.IO.IOException"></exception>
1330
1757
                        {
1331
1758
                                return new ByteArrayInputStream(this._enclosing.@base);
1332
1759
                        }
1333
 
@@ -280,13 +280,13 @@ namespace NGit.Storage.Pack
 
1760
@@ -281,13 +281,13 @@ namespace NGit.Storage.Pack
1334
1761
                        }
1335
1762
 
1336
1763
                        /// <exception cref="System.IO.IOException"></exception>
1346
1773
                        {
1347
1774
                                return new ByteArrayInputStream(new byte[0]);
1348
1775
                        }
1349
 
@@ -298,6 +298,7 @@ namespace NGit.Storage.Pack
 
1776
@@ -299,6 +299,7 @@ namespace NGit.Storage.Pack
1350
1777
                        @base = GetRng().NextBytes(baseSize);
1351
1778
                        data = new byte[dataSize];
1352
1779
                        deltaEnc = new DeltaEncoder(deltaBuf, baseSize, dataSize);
1354
1781
                }
1355
1782
 
1356
1783
                /// <exception cref="System.IO.IOException"></exception>
1357
 
@@ -378,13 +379,13 @@ namespace NGit.Storage.Pack
 
1784
@@ -333,7 +334,11 @@ namespace NGit.Storage.Pack
 
1785
                        delta = deltaBuf.ToByteArray();
 
1786
                        NUnit.Framework.Assert.AreEqual(@base.Length, BinaryDelta.GetBaseSize(delta));
 
1787
                        NUnit.Framework.Assert.AreEqual(data.Length, BinaryDelta.GetResultSize(delta));
 
1788
-                       Assert.AssertArrayEquals(data, BinaryDelta.Apply(@base, delta));
 
1789
+                       var appliedDelta = BinaryDelta.Apply (@base, delta);
 
1790
+                       Assert.AreEqual (data.Length, appliedDelta.Length);
 
1791
+                       for (int i = 0; i < data.Length; i++)
 
1792
+                               Assert.AreEqual (data[i], appliedDelta[i]);
 
1793
+
 
1794
                        // Assert that a single bulk read produces the correct result.
 
1795
                        //
 
1796
                        byte[] act = new byte[data.Length];
 
1797
@@ -378,13 +383,13 @@ namespace NGit.Storage.Pack
1358
1798
                        }
1359
1799
 
1360
1800
                        /// <exception cref="System.IO.IOException"></exception>
1412
1852
                }
1413
1853
 
1414
1854
                [NUnit.Framework.Test]
 
1855
diff --git a/NGit.Test/NGit.Transport/PackParserTest.cs b/NGit.Test/NGit.Transport/PackParserTest.cs
 
1856
index ef78b90..158f417 100644
 
1857
--- a/NGit.Test/NGit.Transport/PackParserTest.cs
 
1858
+++ b/NGit.Test/NGit.Transport/PackParserTest.cs
 
1859
@@ -158,7 +158,7 @@ namespace NGit.Transport
 
1860
                [NUnit.Framework.Test]
 
1861
                public virtual void TestTinyThinPack()
 
1862
                {
 
1863
-                       TestRepository d = new TestRepository(db);
 
1864
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1865
                        RevBlob a = d.Blob("a");
 
1866
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1867
                        PackHeader(pack, 1);
 
1868
@@ -194,7 +194,7 @@ namespace NGit.Transport
 
1869
                [NUnit.Framework.Test]
 
1870
                public virtual void TestPackWithTrailingGarbage()
 
1871
                {
 
1872
-                       TestRepository d = new TestRepository(db);
 
1873
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1874
                        RevBlob a = d.Blob("a");
 
1875
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1876
                        PackHeader(pack, 1);
 
1877
@@ -223,7 +223,7 @@ namespace NGit.Transport
 
1878
                [NUnit.Framework.Test]
 
1879
                public virtual void TestMaxObjectSizeFullBlob()
 
1880
                {
 
1881
-                       TestRepository d = new TestRepository(db);
 
1882
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1883
                        byte[] data = Constants.Encode("0123456789");
 
1884
                        d.Blob(data);
 
1885
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1886
@@ -257,7 +257,7 @@ namespace NGit.Transport
 
1887
                [NUnit.Framework.Test]
 
1888
                public virtual void TestMaxObjectSizeDeltaBlock()
 
1889
                {
 
1890
-                       TestRepository d = new TestRepository(db);
 
1891
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1892
                        RevBlob a = d.Blob("a");
 
1893
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1894
                        PackHeader(pack, 1);
 
1895
@@ -292,7 +292,7 @@ namespace NGit.Transport
 
1896
                [NUnit.Framework.Test]
 
1897
                public virtual void TestMaxObjectSizeDeltaResultSize()
 
1898
                {
 
1899
-                       TestRepository d = new TestRepository(db);
 
1900
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1901
                        RevBlob a = d.Blob("0123456789");
 
1902
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1903
                        PackHeader(pack, 1);
 
1904
@@ -325,7 +325,7 @@ namespace NGit.Transport
 
1905
                [NUnit.Framework.Test]
 
1906
                public virtual void TestNonMarkingInputStream()
 
1907
                {
 
1908
-                       TestRepository d = new TestRepository(db);
 
1909
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1910
                        RevBlob a = d.Blob("a");
 
1911
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
 
1912
                        PackHeader(pack, 1);
 
1913
@@ -372,7 +372,7 @@ namespace NGit.Transport
 
1914
                [NUnit.Framework.Test]
 
1915
                public virtual void TestDataAfterPackFooterSingleRead()
 
1916
                {
 
1917
-                       TestRepository d = new TestRepository(db);
 
1918
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1919
                        RevBlob a = d.Blob("a");
 
1920
                        TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(32 * 1024);
 
1921
                        PackHeader(pack, 1);
 
1922
@@ -426,7 +426,7 @@ namespace NGit.Transport
 
1923
                [NUnit.Framework.Test]
 
1924
                public virtual void TestDataAfterPackFooterSplitHeaderRead()
 
1925
                {
 
1926
-                       TestRepository d = new TestRepository(db);
 
1927
+                       TestRepository d = new TestRepository<FileRepository>(db);
 
1928
                        byte[] data = Constants.Encode("a");
 
1929
                        RevBlob b = d.Blob(data);
 
1930
                        int objects = 248;
 
1931
@@ -524,6 +524,7 @@ namespace NGit.Transport
 
1932
                        if (inserter != null)
 
1933
                        {
 
1934
                                inserter.Release();
 
1935
+                               inserter = null;
 
1936
                        }
 
1937
                }
 
1938
 
1415
1939
diff --git a/NGit.Test/NGit.Transport/PacketLineOutTest.cs b/NGit.Test/NGit.Transport/PacketLineOutTest.cs
1416
1940
index 9a9e0f0..eda412f 100644
1417
1941
--- a/NGit.Test/NGit.Transport/PacketLineOutTest.cs
1459
1983
                        }
1460
1984
 
1461
1985
                        public override void Close()
 
1986
diff --git a/NGit.Test/NGit.Transport/ReceivePackAdvertiseRefsHookTest.cs b/NGit.Test/NGit.Transport/ReceivePackAdvertiseRefsHookTest.cs
 
1987
index acb432f..c0eb35f 100644
 
1988
--- a/NGit.Test/NGit.Transport/ReceivePackAdvertiseRefsHookTest.cs
 
1989
+++ b/NGit.Test/NGit.Transport/ReceivePackAdvertiseRefsHookTest.cs
 
1990
@@ -88,7 +88,7 @@ namespace NGit.Transport
 
1991
                        dst = CreateBareRepository();
 
1992
                        // Fill dst with a some common history.
 
1993
                        //
 
1994
-                       TestRepository d = new TestRepository(dst);
 
1995
+                       TestRepository d = new TestRepository<Repository>(dst);
 
1996
                        a = d.Blob("a");
 
1997
                        A = d.Commit(d.Tree(d.File("a", a)));
 
1998
                        B = d.Commit().Parent(A).Create();
 
1999
@@ -202,7 +202,7 @@ namespace NGit.Transport
 
2000
                        NUnit.Framework.Assert.IsFalse(od.FileFor(b).Exists(), "b not loose");
 
2001
                        // Now use b but in a different commit than what is hidden.
 
2002
                        //
 
2003
-                       TestRepository s = new TestRepository(src);
 
2004
+                       TestRepository s = new TestRepository<Repository>(src);
 
2005
                        RevCommit N = s.Commit().Parent(B).Add("q", b).Create();
 
2006
                        s.Update(R_MASTER, N);
 
2007
                        // Push this new content to the remote, doing strict validation.
 
2008
@@ -608,7 +608,7 @@ namespace NGit.Transport
 
2009
 
 
2010
                private sealed class HidePrivateHook : AbstractAdvertiseRefsHook
 
2011
                {
 
2012
-                       protected override IDictionary<string, Ref> GetAdvertisedRefs(Repository r, RevWalk
 
2013
+                       protected internal override IDictionary<string, Ref> GetAdvertisedRefs(Repository r, RevWalk
 
2014
                                 revWalk)
 
2015
                        {
 
2016
                                IDictionary<string, Ref> refs = new Dictionary<string, Ref>(r.GetAllRefs());
1462
2017
diff --git a/NGit.Test/NGit.Transport/SideBandOutputStreamTest.cs b/NGit.Test/NGit.Transport/SideBandOutputStreamTest.cs
1463
 
index 98c9974..1f30e08 100644
 
2018
index 4ab7f13..303ea4a 100644
1464
2019
--- a/NGit.Test/NGit.Transport/SideBandOutputStreamTest.cs
1465
2020
+++ b/NGit.Test/NGit.Transport/SideBandOutputStreamTest.cs
1466
 
@@ -74,7 +74,7 @@ namespace NGit.Transport
1467
 
                                .SMALL_BUF, rawOut);
 
2021
@@ -73,7 +73,7 @@ namespace NGit.Transport
 
2022
                                , SideBandOutputStream.SMALL_BUF, rawOut);
1468
2023
                        @out.Write(new byte[] { (byte)('a'), (byte)('b'), (byte)('c') });
1469
2024
                        @out.Flush();
1470
2025
-                       AssertBuffer("0008\x1abc");
1472
2027
                }
1473
2028
 
1474
2029
                /// <exception cref="System.IO.IOException"></exception>
1475
 
@@ -86,7 +86,7 @@ namespace NGit.Transport
1476
 
                                .SMALL_BUF, rawOut);
 
2030
@@ -84,7 +84,7 @@ namespace NGit.Transport
 
2031
                                , SideBandOutputStream.SMALL_BUF, rawOut);
1477
2032
                        @out.Write(new byte[] { (byte)('a'), (byte)('b'), (byte)('c') });
1478
2033
                        @out.Flush();
1479
2034
-                       AssertBuffer("0008\x2abc");
1481
2036
                }
1482
2037
 
1483
2038
                /// <exception cref="System.IO.IOException"></exception>
1484
 
@@ -98,7 +98,7 @@ namespace NGit.Transport
1485
 
                                .SMALL_BUF, rawOut);
 
2039
@@ -95,7 +95,7 @@ namespace NGit.Transport
 
2040
                                , SideBandOutputStream.SMALL_BUF, rawOut);
1486
2041
                        @out.Write(new byte[] { (byte)('a'), (byte)('b'), (byte)('c') });
1487
2042
                        @out.Flush();
1488
2043
-                       AssertBuffer("0008\x3abc");
1490
2045
                }
1491
2046
 
1492
2047
                /// <exception cref="System.IO.IOException"></exception>
1493
 
@@ -112,7 +112,7 @@ namespace NGit.Transport
 
2048
@@ -108,7 +108,7 @@ namespace NGit.Transport
1494
2049
                        @out.Write('b');
1495
2050
                        @out.Write('c');
1496
2051
                        @out.Flush();
1499
2054
                }
1500
2055
 
1501
2056
                /// <exception cref="System.IO.IOException"></exception>
1502
 
@@ -125,7 +125,7 @@ namespace NGit.Transport
 
2057
@@ -121,7 +121,7 @@ namespace NGit.Transport
1503
2058
                        @out.Write('b');
1504
2059
                        @out.Write('c');
1505
2060
                        @out.Flush();
1508
2063
                }
1509
2064
 
1510
2065
                /// <exception cref="System.IO.IOException"></exception>
1511
 
@@ -136,7 +136,7 @@ namespace NGit.Transport
1512
 
                        @out = new SideBandOutputStream(SideBandOutputStream.CH_DATA, 6, rawOut);
 
2066
@@ -132,7 +132,7 @@ namespace NGit.Transport
 
2067
                                , 6, rawOut);
1513
2068
                        @out.Write(new byte[] { (byte)('a'), (byte)('b'), (byte)('c') });
1514
2069
                        @out.Flush();
1515
2070
-                       AssertBuffer("0006\x1a0006\x1b0006\x1c");
1517
2072
                }
1518
2073
 
1519
2074
                /// <exception cref="System.IO.IOException"></exception>
1520
 
@@ -148,7 +148,7 @@ namespace NGit.Transport
 
2075
@@ -144,7 +144,7 @@ namespace NGit.Transport
1521
2076
                        @out.Write('a');
1522
2077
                        @out.Write(new byte[] { (byte)('b'), (byte)('c') });
1523
2078
                        @out.Flush();
1526
2081
                }
1527
2082
 
1528
2083
                /// <exception cref="System.IO.IOException"></exception>
1529
 
@@ -174,7 +174,7 @@ namespace NGit.Transport
 
2084
@@ -169,7 +169,7 @@ namespace NGit.Transport
1530
2085
                        NUnit.Framework.Assert.AreEqual(Sharpen.Runtime.GetStringForBytes(act, 0, 4, "UTF-8"
1531
2086
                                ), explen);
1532
2087
                        NUnit.Framework.Assert.AreEqual(1, act[4]);
1536
2091
                                NUnit.Framework.Assert.AreEqual(buf[i_1], act[j]);
1537
2092
                        }
1538
2093
diff --git a/NGit.Test/NGit.Transport/TransportTest.cs b/NGit.Test/NGit.Transport/TransportTest.cs
1539
 
index 90c054f..fdcce34 100644
 
2094
index a9537c1..b05573d 100644
1540
2095
--- a/NGit.Test/NGit.Transport/TransportTest.cs
1541
2096
+++ b/NGit.Test/NGit.Transport/TransportTest.cs
1542
 
@@ -214,6 +214,7 @@ namespace NGit.Transport
 
2097
@@ -227,6 +227,7 @@ namespace NGit.Transport
1543
2098
                }
1544
2099
 
1545
2100
                [NUnit.Framework.Test]
1576
2131
                        string[] schemes = new string[] { "ssh", "ssh+git", "http", "https" };
1577
2132
                        string[] users = new string[] { "me", "l usr\\example.com", "lusr\\example" };
1578
2133
                        string[] passes = new string[] { "wtf" };
 
2134
diff --git a/NGit.Test/NGit.Treewalk.Filter/NotTreeFilterTest.cs b/NGit.Test/NGit.Treewalk.Filter/NotTreeFilterTest.cs
 
2135
index 40ab8ef..d758e9c 100644
 
2136
--- a/NGit.Test/NGit.Treewalk.Filter/NotTreeFilterTest.cs
 
2137
+++ b/NGit.Test/NGit.Treewalk.Filter/NotTreeFilterTest.cs
 
2138
@@ -79,7 +79,7 @@ namespace NGit.Treewalk.Filter
 
2139
                {
 
2140
                        TreeFilter a = TreeFilter.ALL;
 
2141
                        TreeFilter n = NotTreeFilter.Create(a);
 
2142
-                       Assert.AssertEquals(a.ShouldBeRecursive(), n.ShouldBeRecursive());
 
2143
+                       NUnit.Framework.Assert.AreEqual(a.ShouldBeRecursive(), n.ShouldBeRecursive());
 
2144
                }
 
2145
 
 
2146
                /// <exception cref="System.Exception"></exception>
 
2147
diff --git a/NGit.Test/NGit.Util.IO/TimeoutInputStreamTest.cs b/NGit.Test/NGit.Util.IO/TimeoutInputStreamTest.cs
 
2148
index 2e3f12f..f299ccd 100644
 
2149
--- a/NGit.Test/NGit.Util.IO/TimeoutInputStreamTest.cs
 
2150
+++ b/NGit.Test/NGit.Util.IO/TimeoutInputStreamTest.cs
 
2151
@@ -133,7 +133,7 @@ namespace NGit.Util.IO
 
2152
                        byte[] act = new byte[exp.Length];
 
2153
                        @out.Write(exp);
 
2154
                        IOUtil.ReadFully(@is, act, 0, act.Length);
 
2155
-                       Assert.AssertArrayEquals(exp, act);
 
2156
+                        CollectionAssert.AreEquivalent(exp, act);
 
2157
                }
 
2158
 
 
2159
                /// <exception cref="System.IO.IOException"></exception>
 
2160
@@ -146,7 +146,7 @@ namespace NGit.Util.IO
 
2161
                        IOUtil.ReadFully(@is, act, 0, 1);
 
2162
                        IOUtil.ReadFully(@is, act, 1, 1);
 
2163
                        IOUtil.ReadFully(@is, act, 2, 1);
 
2164
-                       Assert.AssertArrayEquals(exp, act);
 
2165
+                        CollectionAssert.AreEquivalent(exp, act);
 
2166
                }
 
2167
 
 
2168
                /// <exception cref="System.IO.IOException"></exception>
 
2169
diff --git a/NGit.Test/NGit.Util.IO/TimeoutOutputStreamTest.cs b/NGit.Test/NGit.Util.IO/TimeoutOutputStreamTest.cs
 
2170
index 0dbef68..adcdaf5 100644
 
2171
--- a/NGit.Test/NGit.Util.IO/TimeoutOutputStreamTest.cs
 
2172
+++ b/NGit.Test/NGit.Util.IO/TimeoutOutputStreamTest.cs
 
2173
@@ -110,7 +110,7 @@ namespace NGit.Util.IO
 
2174
                        os.Write(exp[2]);
 
2175
                        @in.Want(exp.Length);
 
2176
                        @in.Read(act);
 
2177
-                       Assert.AssertArrayEquals(exp, act);
 
2178
+                        CollectionAssert.AreEquivalent(exp, act);
 
2179
                }
 
2180
 
 
2181
                /// <exception cref="System.IO.IOException"></exception>
 
2182
@@ -140,7 +140,7 @@ namespace NGit.Util.IO
 
2183
                        os.Write(exp);
 
2184
                        @in.Want(exp.Length);
 
2185
                        @in.Read(act);
 
2186
-                       Assert.AssertArrayEquals(exp, act);
 
2187
+                        CollectionAssert.AreEquivalent(exp, act);
 
2188
                }
 
2189
 
 
2190
                /// <exception cref="System.IO.IOException"></exception>
1579
2191
diff --git a/NGit.Test/NGit.Util/Base64Test.cs b/NGit.Test/NGit.Util/Base64Test.cs
1580
2192
index 198f581..8cde1df 100644
1581
2193
--- a/NGit.Test/NGit.Util/Base64Test.cs
1911
2523
                        tz = new MockSystemReader().GetTimezone(when);
1912
2524
                        {
1913
2525
                                author = new PersonIdent(author, when, tz);
 
2526
diff --git a/NGit.Test/NGit.Util/GitDateFormatterTest.cs b/NGit.Test/NGit.Util/GitDateFormatterTest.cs
 
2527
index 574964d..96ecf99 100644
 
2528
--- a/NGit.Test/NGit.Util/GitDateFormatterTest.cs
 
2529
+++ b/NGit.Test/NGit.Util/GitDateFormatterTest.cs
 
2530
@@ -77,6 +77,7 @@ namespace NGit.Util
 
2531
                }
 
2532
 
 
2533
                [NUnit.Framework.Test]
 
2534
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2535
                public virtual void DEFAULT()
 
2536
                {
 
2537
                        NUnit.Framework.Assert.AreEqual("Tue Sep 20 19:09:25 2011 -0400", new GitDateFormatter
 
2538
@@ -98,6 +99,7 @@ namespace NGit.Util
 
2539
                }
 
2540
 
 
2541
                [NUnit.Framework.Test]
 
2542
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2543
                public virtual void ISO()
 
2544
                {
 
2545
                        NUnit.Framework.Assert.AreEqual("2011-09-20 19:09:25 -0400", new GitDateFormatter
 
2546
@@ -105,6 +107,7 @@ namespace NGit.Util
 
2547
                }
 
2548
 
 
2549
                [NUnit.Framework.Test]
 
2550
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2551
                public virtual void RFC()
 
2552
                {
 
2553
                        NUnit.Framework.Assert.AreEqual("Tue, 20 Sep 2011 19:09:25 -0400", new GitDateFormatter
 
2554
@@ -119,6 +122,7 @@ namespace NGit.Util
 
2555
                }
 
2556
 
 
2557
                [NUnit.Framework.Test]
 
2558
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2559
                public virtual void RAW()
 
2560
                {
 
2561
                        NUnit.Framework.Assert.AreEqual("1316560165 -0400", new GitDateFormatter(GitDateFormatter.Format
 
2562
@@ -126,12 +130,14 @@ namespace NGit.Util
 
2563
                }
 
2564
 
 
2565
                [NUnit.Framework.Test]
 
2566
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2567
                public virtual void LOCALE()
 
2568
                {
 
2569
                        NUnit.Framework.Assert.AreEqual("Sep 20, 2011 7:09:25 PM -0400", new GitDateFormatter
 
2570
                                (GitDateFormatter.Format.LOCALE).FormatDate(ident));
 
2571
                }
 
2572
 
 
2573
+               [NUnit.Framework.Ignore ("Matching java date formatting is not critical right now")]
 
2574
                [NUnit.Framework.Test]
 
2575
                public virtual void LOCALELOCAL()
 
2576
                {
1914
2577
diff --git a/NGit.Test/NGit.Util/QuotedStringGitPathStyleTest.cs b/NGit.Test/NGit.Util/QuotedStringGitPathStyleTest.cs
1915
2578
index 633a02d..f894143 100644
1916
2579
--- a/NGit.Test/NGit.Util/QuotedStringGitPathStyleTest.cs
1939
2602
                {
1940
2603
                        AssertDequote("\u00c5ngstr\u00f6m", "\x131ngstr\x16em");
1941
2604
diff --git a/NGit.Test/NGit.Util/RefListTest.cs b/NGit.Test/NGit.Util/RefListTest.cs
1942
 
index 8375f53..e04fe82 100644
 
2605
index 8375f53..0a0f4ec 100644
1943
2606
--- a/NGit.Test/NGit.Util/RefListTest.cs
1944
2607
+++ b/NGit.Test/NGit.Util/RefListTest.cs
1945
2608
@@ -326,7 +326,7 @@ namespace NGit.Util
1947
2610
                        RefList<Ref> two = one.Remove(1);
1948
2611
                        NUnit.Framework.Assert.AreNotSame(one, two);
1949
2612
-                       NUnit.Framework.Assert.AreSame(two, RefList.EmptyList());
1950
 
+                       NUnit.Framework.CollectionAssert.AreEqual(two, RefList.EmptyList<Ref>());
 
2613
+                       NUnit.Framework.CollectionAssert.AreEquivalent(two, RefList.EmptyList<Ref>());
1951
2614
                }
1952
2615
 
1953
2616
                [NUnit.Framework.Test]
1954
2617
diff --git a/NGit.Test/NGit.Util/RefMapTest.cs b/NGit.Test/NGit.Util/RefMapTest.cs
1955
 
index d0f761a..60fc113 100644
 
2618
index ed84d83..046c9ae 100644
1956
2619
--- a/NGit.Test/NGit.Util/RefMapTest.cs
1957
2620
+++ b/NGit.Test/NGit.Util/RefMapTest.cs
1958
2621
@@ -209,15 +209,18 @@ namespace NGit.Util
1975
2638
                }
1976
2639
 
1977
2640
                // expected
1978
 
@@ -445,10 +448,10 @@ namespace NGit.Util
1979
 
                        Iterator<KeyValuePair<string, Ref>> itr = map.EntrySet().Iterator();
1980
 
                        KeyValuePair<string, Ref> ent_a = itr.Next();
1981
 
                        KeyValuePair<string, Ref> ent_b = itr.Next();
1982
 
-                       NUnit.Framework.Assert.AreEqual(ent_a.GetHashCode(), "A".GetHashCode());
1983
 
+//                     NUnit.Framework.Assert.AreEqual(ent_a.GetHashCode(), "A".GetHashCode());
1984
 
                        NUnit.Framework.Assert.IsTrue(ent_a.Equals(ent_a));
1985
 
                        NUnit.Framework.Assert.IsFalse(ent_a.Equals(ent_b));
1986
 
-                       NUnit.Framework.Assert.AreEqual(a.ToString(), ent_a.ToString());
1987
 
+                       NUnit.Framework.Assert.AreEqual(a.ToString(), ent_a.Value.ToString());
 
2641
@@ -436,6 +439,7 @@ namespace NGit.Util
1988
2642
                }
1989
2643
 
1990
2644
                [NUnit.Framework.Test]
1991
 
@@ -462,10 +465,15 @@ namespace NGit.Util
 
2645
+               [NUnit.Framework.Ignore ("This test compares ToString and GetHashCode between .NETs KeyValuePair and Java's equivalent. They're semantically different")]
 
2646
                public virtual void TestEntryType()
 
2647
                {
 
2648
                        Ref a = NewRef("refs/heads/A", ID_ONE);
 
2649
@@ -462,10 +466,15 @@ namespace NGit.Util
1992
2650
                        KeyValuePair<string, Ref> ent = map.EntrySet().Iterator().Next();
1993
2651
                        NUnit.Framework.Assert.AreEqual("A", ent.Key);
1994
2652
                        NUnit.Framework.Assert.AreSame(refA_one, ent.Value);
2008
2666
                }
2009
2667
 
2010
2668
                private RefList<Ref> ToList(params Ref[] refs)
 
2669
diff --git a/NGit.Test/NGit.Util/TemporaryBufferTest.cs b/NGit.Test/NGit.Util/TemporaryBufferTest.cs
 
2670
index 9ffdcf9..405a0eb 100644
 
2671
--- a/NGit.Test/NGit.Util/TemporaryBufferTest.cs
 
2672
+++ b/NGit.Test/NGit.Util/TemporaryBufferTest.cs
 
2673
@@ -124,7 +124,8 @@ namespace NGit.Util
 
2674
                                        byte[] r = b.ToByteArray();
 
2675
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2676
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2677
-                                       Assert.AssertArrayEquals(test, r);
 
2678
+                                       for (int i = 0; i < test.Length; i ++)
 
2679
+                                               Assert.AreEqual (test[i], r[i]);;
 
2680
                                }
 
2681
                                {
 
2682
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2683
@@ -132,7 +133,8 @@ namespace NGit.Util
 
2684
                                        o.Close();
 
2685
                                        byte[] r = o.ToByteArray();
 
2686
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2687
-                                       Assert.AssertArrayEquals(test, r);
 
2688
+                                       for (int i = 0; i < test.Length; i ++)
 
2689
+                                               Assert.AreEqual (test[i], r[i]);
 
2690
                                }
 
2691
                        }
 
2692
                        finally
 
2693
@@ -160,7 +162,8 @@ namespace NGit.Util
 
2694
                                        byte[] r = b.ToByteArray();
 
2695
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2696
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2697
-                                       Assert.AssertArrayEquals(test, r);
 
2698
+                                       for (int i = 0; i < test.Length; i ++)
 
2699
+                                               Assert.AreEqual (test[i], r[i]);
 
2700
                                }
 
2701
                                {
 
2702
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2703
@@ -168,7 +171,8 @@ namespace NGit.Util
 
2704
                                        o.Close();
 
2705
                                        byte[] r = o.ToByteArray();
 
2706
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2707
-                                       Assert.AssertArrayEquals(test, r);
 
2708
+                                       for (int i = 0; i < test.Length; i ++)
 
2709
+                                               Assert.AreEqual (test[i], r[i]);
 
2710
                                }
 
2711
                        }
 
2712
                        finally
 
2713
@@ -196,7 +200,8 @@ namespace NGit.Util
 
2714
                                        byte[] r = b.ToByteArray();
 
2715
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2716
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2717
-                                       Assert.AssertArrayEquals(test, r);
 
2718
+                                       for (int i = 0; i < test.Length; i ++)
 
2719
+                                               Assert.AreEqual (test[i], r[i]);
 
2720
                                }
 
2721
                                {
 
2722
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2723
@@ -204,7 +209,8 @@ namespace NGit.Util
 
2724
                                        o.Close();
 
2725
                                        byte[] r = o.ToByteArray();
 
2726
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2727
-                                       Assert.AssertArrayEquals(test, r);
 
2728
+                                       for (int i = 0; i < test.Length; i ++)
 
2729
+                                               Assert.AreEqual (test[i], r[i]);
 
2730
                                }
 
2731
                        }
 
2732
                        finally
 
2733
@@ -231,7 +237,8 @@ namespace NGit.Util
 
2734
                                        byte[] r = b.ToByteArray();
 
2735
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2736
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2737
-                                       Assert.AssertArrayEquals(test, r);
 
2738
+                                       for (int i = 0; i < test.Length; i ++)
 
2739
+                                               Assert.AreEqual (test[i], r[i]);
 
2740
                                }
 
2741
                                {
 
2742
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2743
@@ -239,7 +246,8 @@ namespace NGit.Util
 
2744
                                        o.Close();
 
2745
                                        byte[] r = o.ToByteArray();
 
2746
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2747
-                                       Assert.AssertArrayEquals(test, r);
 
2748
+                                       for (int i = 0; i < test.Length; i ++)
 
2749
+                                               Assert.AreEqual (test[i], r[i]);
 
2750
                                }
 
2751
                        }
 
2752
                        finally
 
2753
@@ -264,7 +272,8 @@ namespace NGit.Util
 
2754
                                        byte[] r = b.ToByteArray();
 
2755
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2756
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2757
-                                       Assert.AssertArrayEquals(test, r);
 
2758
+                                       for (int i = 0; i < test.Length; i ++)
 
2759
+                                               Assert.AreEqual (test[i], r[i]);
 
2760
                                }
 
2761
                                {
 
2762
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2763
@@ -272,7 +281,8 @@ namespace NGit.Util
 
2764
                                        o.Close();
 
2765
                                        byte[] r = o.ToByteArray();
 
2766
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2767
-                                       Assert.AssertArrayEquals(test, r);
 
2768
+                                       for (int i = 0; i < test.Length; i ++)
 
2769
+                                               Assert.AreEqual (test[i], r[i]);
 
2770
                                }
 
2771
                        }
 
2772
                        finally
 
2773
@@ -293,7 +303,8 @@ namespace NGit.Util
 
2774
                        InputStream @in = b.OpenInputStream();
 
2775
                        byte[] act = new byte[cnt];
 
2776
                        IOUtil.ReadFully(@in, act, 0, cnt);
 
2777
-                       Assert.AssertArrayEquals(test, act);
 
2778
+                       for (int i = 0; i < test.Length; i ++)
 
2779
+                               Assert.AreEqual (test[i], act[i]);
 
2780
                }
 
2781
 
 
2782
                /// <exception cref="System.IO.IOException"></exception>
 
2783
@@ -313,7 +324,8 @@ namespace NGit.Util
 
2784
                                        byte[] r = b.ToByteArray();
 
2785
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2786
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2787
-                                       Assert.AssertArrayEquals(test, r);
 
2788
+                                       for (int i = 0; i < test.Length; i ++)
 
2789
+                                               Assert.AreEqual (test[i], r[i]);
 
2790
                                }
 
2791
                                {
 
2792
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2793
@@ -321,7 +333,8 @@ namespace NGit.Util
 
2794
                                        o.Close();
 
2795
                                        byte[] r = o.ToByteArray();
 
2796
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2797
-                                       Assert.AssertArrayEquals(test, r);
 
2798
+                                       for (int i = 0; i < test.Length; i ++)
 
2799
+                                               Assert.AreEqual (test[i], r[i]);
 
2800
                                }
 
2801
                        }
 
2802
                        finally
 
2803
@@ -347,7 +360,8 @@ namespace NGit.Util
 
2804
                                        byte[] r = b.ToByteArray();
 
2805
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2806
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2807
-                                       Assert.AssertArrayEquals(test, r);
 
2808
+                                       for (int i = 0; i < test.Length; i ++)
 
2809
+                                               Assert.AreEqual (test[i], r[i]);
 
2810
                                }
 
2811
                                {
 
2812
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2813
@@ -355,7 +369,8 @@ namespace NGit.Util
 
2814
                                        o.Close();
 
2815
                                        byte[] r = o.ToByteArray();
 
2816
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2817
-                                       Assert.AssertArrayEquals(test, r);
 
2818
+                                       for (int i = 0; i < test.Length; i ++)
 
2819
+                                               Assert.AreEqual (test[i], r[i]);
 
2820
                                }
 
2821
                        }
 
2822
                        finally
 
2823
@@ -383,7 +398,8 @@ namespace NGit.Util
 
2824
                                        byte[] r = b.ToByteArray();
 
2825
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2826
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2827
-                                       Assert.AssertArrayEquals(test, r);
 
2828
+                                       for (int i = 0; i < test.Length; i ++)
 
2829
+                                               Assert.AreEqual (test[i], r[i]);
 
2830
                                }
 
2831
                                {
 
2832
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2833
@@ -391,7 +407,8 @@ namespace NGit.Util
 
2834
                                        o.Close();
 
2835
                                        byte[] r = o.ToByteArray();
 
2836
                                        NUnit.Framework.Assert.AreEqual(test.Length, r.Length);
 
2837
-                                       Assert.AssertArrayEquals(test, r);
 
2838
+                                       for (int i = 0; i < test.Length; i ++)
 
2839
+                                               Assert.AreEqual (test[i], r[i]);
 
2840
                                }
 
2841
                        }
 
2842
                        finally
 
2843
@@ -453,7 +470,8 @@ namespace NGit.Util
 
2844
                                        byte[] r = b.ToByteArray();
 
2845
                                        NUnit.Framework.Assert.IsNotNull(r);
 
2846
                                        NUnit.Framework.Assert.AreEqual(expect.Length, r.Length);
 
2847
-                                       Assert.AssertArrayEquals(expect, r);
 
2848
+                                       for (int i = 0; i < expect.Length; i ++)
 
2849
+                                               Assert.AreEqual (expect[i], r[i]);
 
2850
                                }
 
2851
                                {
 
2852
                                        ByteArrayOutputStream o = new ByteArrayOutputStream();
 
2853
@@ -461,7 +479,8 @@ namespace NGit.Util
 
2854
                                        o.Close();
 
2855
                                        byte[] r = o.ToByteArray();
 
2856
                                        NUnit.Framework.Assert.AreEqual(expect.Length, r.Length);
 
2857
-                                       Assert.AssertArrayEquals(expect, r);
 
2858
+                                       for (int i = 0; i < expect.Length; i ++)
 
2859
+                                               Assert.AreEqual (expect[i], r[i]);
 
2860
                                }
 
2861
                        }
 
2862
                        finally
 
2863
diff --git a/NGit.Test/NGit/ConfigTest.cs b/NGit.Test/NGit/ConfigTest.cs
 
2864
index 1ab4f52..15b3601 100644
 
2865
--- a/NGit.Test/NGit/ConfigTest.cs
 
2866
+++ b/NGit.Test/NGit/ConfigTest.cs
 
2867
@@ -106,7 +106,7 @@ namespace NGit
 
2868
                        c.SetStringList("my", null, "somename", values);
 
2869
                        object[] expArr = Sharpen.Collections.ToArray(values);
 
2870
                        string[] actArr = c.GetStringList("my", null, "somename");
 
2871
-                       Assert.AssertArrayEquals(expArr, actArr);
 
2872
+                       CollectionAssert.AreEquivalent(expArr, actArr);
 
2873
                        string expText = "[my]\n\tsomename = value1\n\tsomename = value2\n";
 
2874
                        NUnit.Framework.Assert.AreEqual(expText, c.ToText());
 
2875
                }
2011
2876
diff --git a/NGit.Test/NGit/ConstantsEncodingTest.cs b/NGit.Test/NGit/ConstantsEncodingTest.cs
2012
 
index 22e896a..6d7c2df 100644
 
2877
index 70d2566..1c89a82 100644
2013
2878
--- a/NGit.Test/NGit/ConstantsEncodingTest.cs
2014
2879
+++ b/NGit.Test/NGit/ConstantsEncodingTest.cs
2015
 
@@ -102,7 +102,7 @@ namespace NGit
 
2880
@@ -58,7 +58,7 @@ namespace NGit
 
2881
                        string src = "abc";
 
2882
                        byte[] exp = new byte[] { (byte)('a'), (byte)('b'), (byte)('c') };
 
2883
                        byte[] res = Constants.EncodeASCII(src);
 
2884
-                       Assert.AssertArrayEquals(exp, res);
 
2885
+                       CollectionAssert.AreEquivalent(exp, res);
 
2886
                        NUnit.Framework.Assert.AreEqual(src, Sharpen.Runtime.GetStringForBytes(res, 0, res
 
2887
                                .Length, "UTF-8"));
 
2888
                }
 
2889
@@ -84,7 +84,7 @@ namespace NGit
 
2890
                        long src = 13;
 
2891
                        byte[] exp = new byte[] { (byte)('1'), (byte)('3') };
 
2892
                        byte[] res = Constants.EncodeASCII(src);
 
2893
-                       Assert.AssertArrayEquals(exp, res);
 
2894
+                       CollectionAssert.AreEquivalent(exp, res);
 
2895
                }
 
2896
 
 
2897
                /// <exception cref="Sharpen.UnsupportedEncodingException"></exception>
 
2898
@@ -94,7 +94,7 @@ namespace NGit
 
2899
                        string src = "abc";
 
2900
                        byte[] exp = new byte[] { (byte)('a'), (byte)('b'), (byte)('c') };
 
2901
                        byte[] res = Constants.Encode(src);
 
2902
-                       Assert.AssertArrayEquals(exp, res);
 
2903
+                       CollectionAssert.AreEquivalent(exp, res);
 
2904
                        NUnit.Framework.Assert.AreEqual(src, Sharpen.Runtime.GetStringForBytes(res, 0, res
 
2905
                                .Length, "UTF-8"));
 
2906
                }
 
2907
@@ -103,7 +103,7 @@ namespace NGit
2016
2908
                [NUnit.Framework.Test]
2017
2909
                public virtual void TestEncode_Unicode()
2018
2910
                {
2021
2913
                        byte[] exp = new byte[] { unchecked((byte)unchecked((int)(0xC5))), unchecked((byte
2022
2914
                                )unchecked((int)(0xAA))), unchecked((int)(0x6E)), unchecked((byte)unchecked((int
2023
2915
                                )(0xC4))), unchecked((byte)unchecked((int)(0xAD))), unchecked((int)(0x63)), unchecked(
2024
 
@@ -110,8 +110,8 @@ namespace NGit
 
2916
@@ -111,7 +111,7 @@ namespace NGit
2025
2917
                                (int)(0x64)), unchecked((int)(0x65)), unchecked((byte)unchecked((int)(0xCC))), unchecked(
2026
2918
                                (byte)unchecked((int)(0xBD))) };
2027
2919
                        byte[] res = Constants.Encode(src);
2028
 
-                       NUnit.Framework.Assert.IsTrue(Arrays.Equals(exp, res));
2029
 
-                       NUnit.Framework.Assert.AreEqual(src, Sharpen.Runtime.GetStringForBytes(res, 0, res
2030
 
+                       NUnit.Framework.CollectionAssert.AreEqual(exp, res);
2031
 
+                       NUnit.Framework.Assert.AreEqual(src, Sharpen.Runtime.GetStringForBytes(exp, 0, exp
 
2920
-                       Assert.AssertArrayEquals(exp, res);
 
2921
+                       CollectionAssert.AreEquivalent(exp, res);
 
2922
                        NUnit.Framework.Assert.AreEqual(src, Sharpen.Runtime.GetStringForBytes(res, 0, res
2032
2923
                                .Length, "UTF-8"));
2033
2924
                }
2034
 
        }
2035
2925
diff --git a/NGit.Test/NGit/DirCacheCheckoutTest.cs b/NGit.Test/NGit/DirCacheCheckoutTest.cs
2036
 
index f6e2ea0..e543517 100644
 
2926
index d698d1e..a16246d 100644
2037
2927
--- a/NGit.Test/NGit/DirCacheCheckoutTest.cs
2038
2928
+++ b/NGit.Test/NGit/DirCacheCheckoutTest.cs
2039
 
@@ -1181,7 +1181,8 @@ namespace NGit
 
2929
@@ -1178,7 +1178,8 @@ namespace NGit
2040
2930
                                                offset += numRead;
2041
2931
                                        }
2042
2932
                                        @is.Close();
2047
2937
                                        nrFiles++;
2048
2938
                                }
2049
2939
diff --git a/NGit.Test/NGit/IndexDiffTest.cs b/NGit.Test/NGit/IndexDiffTest.cs
2050
 
index da275a7..d2a9a6c 100644
 
2940
index 88f4aae..41a9f7c 100644
2051
2941
--- a/NGit.Test/NGit/IndexDiffTest.cs
2052
2942
+++ b/NGit.Test/NGit/IndexDiffTest.cs
2053
2943
@@ -51,6 +51,7 @@ using NGit.Revwalk;
2063
2953
                        NUnit.Framework.Assert.AreEqual(0, diff.GetModified().Count);
2064
2954
                        NUnit.Framework.Assert.AreEqual(0, diff.GetRemoved().Count);
2065
2955
-                       NUnit.Framework.Assert.AreEqual(Collections.EMPTY_SET, diff.GetUntrackedFolders()
2066
 
+                       NUnit.Framework.Assert.AreEqual(Collections<string>.EMPTY_SET, diff.GetUntrackedFolders()
 
2956
+                       NUnit.Framework.CollectionAssert.AreEquivalent(Collections<string>.EMPTY_SET, diff.GetUntrackedFolders()
2067
2957
                                );
2068
2958
                }
2069
2959
 
2185
3075
                                );
2186
3076
                        WriteTrashFile("readme", string.Empty);
2187
3077
                        WriteTrashFile("src/com/A.java", string.Empty);
2188
 
@@ -450,7 +453,7 @@ namespace NGit
 
3078
@@ -444,20 +447,20 @@ namespace NGit
 
3079
                        git.Commit().SetMessage("initial").Call();
 
3080
                        diff = new IndexDiff(db, Constants.HEAD, new FileTreeIterator(db));
 
3081
                        diff.Diff();
 
3082
-                       NUnit.Framework.Assert.AreEqual(new HashSet<string>(Arrays.AsList("target")), diff
 
3083
+                       NUnit.Framework.CollectionAssert.AreEquivalent(new HashSet<string>(Arrays.AsList("target")), diff
 
3084
                                .GetUntrackedFolders());
 
3085
                        WriteTrashFile("src/tst/A.java", string.Empty);
2189
3086
                        WriteTrashFile("src/tst/B.java", string.Empty);
2190
3087
                        diff = new IndexDiff(db, Constants.HEAD, new FileTreeIterator(db));
2191
3088
                        diff.Diff();
2194
3091
                                )), diff.GetUntrackedFolders());
2195
3092
                        git.Rm().AddFilepattern("src/com/B.java").AddFilepattern("src/org").Call();
2196
3093
                        git.Commit().SetMessage("second").Call();
 
3094
                        WriteTrashFile("src/org/C.java", string.Empty);
 
3095
                        diff = new IndexDiff(db, Constants.HEAD, new FileTreeIterator(db));
 
3096
                        diff.Diff();
 
3097
-                       NUnit.Framework.Assert.AreEqual(new HashSet<string>(Arrays.AsList("src/org", "src/tst"
 
3098
+                       NUnit.Framework.CollectionAssert.AreEquivalent(new HashSet<string>(Arrays.AsList("src/org", "src/tst"
 
3099
                                , "target")), diff.GetUntrackedFolders());
 
3100
                }
 
3101
 
2197
3102
@@ -493,7 +496,7 @@ namespace NGit
2198
3103
                        NUnit.Framework.Assert.AreEqual(1, diff.GetChanged().Count);
2199
3104
                        NUnit.Framework.Assert.IsTrue(diff.GetAssumeUnchanged().Contains("file2"));
2204
3109
                }
2205
3110
 
2206
3111
diff --git a/NGit.Test/NGit/MergeHeadMsgTest.cs b/NGit.Test/NGit/MergeHeadMsgTest.cs
2207
 
index ff18e73..62d7d9f 100644
 
3112
index 56449e6..62d7d9f 100644
2208
3113
--- a/NGit.Test/NGit/MergeHeadMsgTest.cs
2209
3114
+++ b/NGit.Test/NGit/MergeHeadMsgTest.cs
2210
3115
@@ -81,7 +81,7 @@ namespace NGit
2211
3116
                        NUnit.Framework.Assert.AreEqual(db.ReadMergeHeads()[0], ObjectId.ZeroId);
2212
3117
                        NUnit.Framework.Assert.AreEqual(db.ReadMergeHeads()[1], ObjectId.FromString(sampleId
2213
3118
                                ));
2214
 
-                       db.WriteMergeHeads(Collections.EMPTY_LIST);
 
3119
-                       db.WriteMergeHeads(Collections.EmptyList<ObjectId>());
2215
3120
+                       db.WriteMergeHeads(Collections.EmptyList<ObjectId> ());
2216
3121
                        NUnit.Framework.Assert.AreEqual(Read(new FilePath(db.Directory, "MERGE_HEAD")), string.Empty
2217
3122
                                );
2248
3153
                        {
2249
3154
                        }
2250
3155
                }
 
3156
diff --git a/NGit.Test/NGit/RefTest.cs b/NGit.Test/NGit/RefTest.cs
 
3157
index 1be0959..9f5b6f5 100644
 
3158
--- a/NGit.Test/NGit/RefTest.cs
 
3159
+++ b/NGit.Test/NGit/RefTest.cs
 
3160
@@ -204,7 +204,7 @@ namespace NGit
 
3161
                        NUnit.Framework.Assert.AreEqual("refs/heads/master", dst.GetName());
 
3162
                        NUnit.Framework.Assert.AreSame(dst.GetObjectId(), @ref.GetObjectId());
 
3163
                        NUnit.Framework.Assert.AreSame(dst.GetPeeledObjectId(), @ref.GetPeeledObjectId());
 
3164
-                       Assert.AssertEquals(dst.IsPeeled(), @ref.IsPeeled());
 
3165
+                       NUnit.Framework.Assert.AreEqual(dst.IsPeeled(), @ref.IsPeeled());
 
3166
                }
 
3167
        }
 
3168
 }
2251
3169
diff --git a/NGit.Test/NGit/RepositoryTestCase.cs b/NGit.Test/NGit/RepositoryTestCase.cs
2252
 
index 6ebb820..6c2dcfd 100644
 
3170
index 13fc827..3d4693b 100644
2253
3171
--- a/NGit.Test/NGit/RepositoryTestCase.cs
2254
3172
+++ b/NGit.Test/NGit/RepositoryTestCase.cs
2255
 
@@ -248,7 +248,7 @@ namespace NGit
 
3173
@@ -108,6 +108,7 @@ namespace NGit
 
3174
                /// <exception cref="System.IO.IOException"></exception>
 
3175
                protected internal virtual string Read(string name)
 
3176
                {
 
3177
+                       return base.Read (name);
 
3178
                        return JGitTestUtil.Read(db, name);
 
3179
                }
 
3180
 
 
3181
@@ -263,7 +264,7 @@ namespace NGit
2256
3182
                                }
2257
3183
                                if (0 != (includedOptions & ASSUME_UNCHANGED))
2258
3184
                                {
2261
3187
                                }
2262
3188
                                sb.Append("]");
2263
3189
                        }
 
3190
diff --git a/NGit.Test/NGit/ValidRefNameTest.cs b/NGit.Test/NGit/ValidRefNameTest.cs
 
3191
index 5f9892d..2b54740 100644
 
3192
--- a/NGit.Test/NGit/ValidRefNameTest.cs
 
3193
+++ b/NGit.Test/NGit/ValidRefNameTest.cs
 
3194
@@ -52,7 +52,7 @@ namespace NGit
 
3195
        {
 
3196
                private static void AssertValid(bool exp, string name)
 
3197
                {
 
3198
-                       Assert.AssertEquals("\"" + name + "\"", exp, Repository.IsValidRefName(name));
 
3199
+                       NUnit.Framework.Assert.AreEqual(exp, Repository.IsValidRefName(name), "\"" + name + "\"");
 
3200
                }
 
3201
 
 
3202
                [NUnit.Framework.Test]
2264
3203
diff --git a/NGit/NGit.Api/ApplyCommand.cs b/NGit/NGit.Api/ApplyCommand.cs
2265
 
index c3b2cd3..db6994b 100644
 
3204
index fa1a824..259b310 100644
2266
3205
--- a/NGit/NGit.Api/ApplyCommand.cs
2267
3206
+++ b/NGit/NGit.Api/ApplyCommand.cs
2268
 
@@ -164,6 +164,7 @@ namespace NGit.Api
 
3207
@@ -170,6 +170,7 @@ namespace NGit.Api
2269
3208
                                                        FileWriter fw = new FileWriter(GetFile(fh.GetNewPath(), true));
2270
3209
                                                        fw.Write(Sharpen.Runtime.GetStringForBytes(bs));
2271
3210
                                                        fw.Close();
2274
3213
                                        }
2275
3214
                                        r.AddUpdatedFile(f);
2276
3215
diff --git a/NGit/NGit.Api/CleanCommand.cs b/NGit/NGit.Api/CleanCommand.cs
2277
 
index 205c17e..9e8820d 100644
 
3216
index 60b6b4d..fe92e99 100644
2278
3217
--- a/NGit/NGit.Api/CleanCommand.cs
2279
3218
+++ b/NGit/NGit.Api/CleanCommand.cs
2280
3219
@@ -57,7 +57,7 @@ namespace NGit.Api
2286
3225
 
2287
3226
                private bool dryRun;
2288
3227
 
 
3228
diff --git a/NGit/NGit.Api/CloneCommand.cs b/NGit/NGit.Api/CloneCommand.cs
 
3229
index 795c632..a822735 100644
 
3230
--- a/NGit/NGit.Api/CloneCommand.cs
 
3231
+++ b/NGit/NGit.Api/CloneCommand.cs
 
3232
@@ -134,7 +134,7 @@ namespace NGit.Api
 
3233
                        {
 
3234
                                directory = new FilePath(u.GetHumanishName(), Constants.DOT_GIT);
 
3235
                        }
 
3236
-                       if (directory.Exists() && directory.ListFiles().Length != 0)
 
3237
+                       if (directory.IsFile () || (directory.Exists() && directory.ListFiles().Length != 0))
 
3238
                        {
 
3239
                                throw new JGitInternalException(MessageFormat.Format(JGitText.Get().cloneNonEmptyDirectory
 
3240
                                        , directory.GetName()));
2289
3241
diff --git a/NGit/NGit.Api/CreateBranchCommand.cs b/NGit/NGit.Api/CreateBranchCommand.cs
2290
 
index 44bbfc1..584bdb0 100644
 
3242
index e27a811..b17b517 100644
2291
3243
--- a/NGit/NGit.Api/CreateBranchCommand.cs
2292
3244
+++ b/NGit/NGit.Api/CreateBranchCommand.cs
2293
3245
@@ -77,7 +77,8 @@ namespace NGit.Api
2301
3253
 
2302
3254
                /// <param name="repo"></param>
2303
3255
diff --git a/NGit/NGit.Api/FetchCommand.cs b/NGit/NGit.Api/FetchCommand.cs
2304
 
index b3c71be..ba774d9 100644
 
3256
index c0cf6b1..b69316e 100644
2305
3257
--- a/NGit/NGit.Api/FetchCommand.cs
2306
3258
+++ b/NGit/NGit.Api/FetchCommand.cs
2307
 
@@ -152,7 +152,7 @@ namespace NGit.Api
 
3259
@@ -139,16 +139,16 @@ namespace NGit.Api
 
3260
                                throw new InvalidRemoteException(MessageFormat.Format(JGitText.Get().invalidRemote
 
3261
                                        , remote), e);
 
3262
                        }
 
3263
-                       catch (TransportException e)
 
3264
+                       catch (NGit.Errors.TransportException e)
 
3265
                        {
 
3266
-                               throw new TransportException(e.Message, e);
 
3267
+                               throw new NGit.Errors.TransportException(e.Message, e);
 
3268
                        }
 
3269
                        catch (URISyntaxException)
 
3270
                        {
2308
3271
                                throw new InvalidRemoteException(MessageFormat.Format(JGitText.Get().invalidRemote
2309
3272
                                        , remote));
2310
3273
                        }
2314
3277
                                throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfFetchCommand
2315
3278
                                        , e);
2316
3279
diff --git a/NGit/NGit.Api/GitCommand.cs b/NGit/NGit.Api/GitCommand.cs
2317
 
index fe5ecdb..79f22d8 100644
 
3280
index ac3ce5f..2b00f54 100644
2318
3281
--- a/NGit/NGit.Api/GitCommand.cs
2319
3282
+++ b/NGit/NGit.Api/GitCommand.cs
2320
3283
@@ -48,6 +48,10 @@ using Sharpen;
2338
3301
                /// <summary>The repository this command is working with</summary>
2339
3302
                protected internal readonly Repository repo;
2340
3303
diff --git a/NGit/NGit.Api/LsRemoteCommand.cs b/NGit/NGit.Api/LsRemoteCommand.cs
2341
 
index 4a63e33..de85bd7 100644
 
3304
index 839ac7f..92b5217 100644
2342
3305
--- a/NGit/NGit.Api/LsRemoteCommand.cs
2343
3306
+++ b/NGit/NGit.Api/LsRemoteCommand.cs
2344
 
@@ -185,7 +185,7 @@ namespace NGit.Api
 
3307
@@ -196,14 +196,14 @@ namespace NGit.Api
2345
3308
                                throw new InvalidRemoteException(MessageFormat.Format(JGitText.Get().invalidRemote
2346
3309
                                        , remote));
2347
3310
                        }
2350
3313
                        {
2351
3314
                                throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfLsRemoteCommand
2352
3315
                                        , e);
 
3316
                        }
 
3317
-                       catch (TransportException e)
 
3318
+                       catch (NGit.Errors.TransportException e)
 
3319
                        {
 
3320
-                               throw new TransportException(e.Message, e);
 
3321
+                               throw new NGit.Errors.TransportException(e.Message, e);
 
3322
                        }
 
3323
                        finally
 
3324
                        {
2353
3325
diff --git a/NGit/NGit.Api/MergeCommand.cs b/NGit/NGit.Api/MergeCommand.cs
2354
 
index 6bd8fe5..2756d6f 100644
 
3326
index 23f2008..064a76b 100644
2355
3327
--- a/NGit/NGit.Api/MergeCommand.cs
2356
3328
+++ b/NGit/NGit.Api/MergeCommand.cs
2357
 
@@ -180,7 +180,7 @@ namespace NGit.Api
2358
 
                                                repo.WriteMergeHeads(Arrays.AsList(@ref.GetObjectId()));
 
3329
@@ -213,7 +213,7 @@ namespace NGit.Api
 
3330
                                                }
2359
3331
                                                Merger merger = mergeStrategy.NewMerger(repo);
2360
3332
                                                bool noProblems;
2361
3333
-                                               IDictionary<string, MergeResult<object>> lowLevelResults = null;
2364
3336
                                                IList<string> unmergedPaths = null;
2365
3337
                                                if (merger is ResolveMerger)
2366
3338
diff --git a/NGit/NGit.Api/MergeCommandResult.cs b/NGit/NGit.Api/MergeCommandResult.cs
2367
 
index a668a83..34ce28d 100644
 
3339
index 34b8233..d0ab269 100644
2368
3340
--- a/NGit/NGit.Api/MergeCommandResult.cs
2369
3341
+++ b/NGit/NGit.Api/MergeCommandResult.cs
2370
 
@@ -93,7 +93,7 @@ namespace NGit.Api
2371
 
                /// <see cref="NGit.Merge.MergeStrategy">NGit.Merge.MergeStrategy</see>
2372
 
                /// </param>
 
3342
@@ -95,7 +95,7 @@ namespace NGit.Api
 
3343
                /// <since>2.0</since>
2373
3344
                public MergeCommandResult(ObjectId newHead, ObjectId @base, ObjectId[] mergedCommits
2374
 
-                       , MergeStatus mergeStatus, IDictionary<string, MergeResult<object>> lowLevelResults
2375
 
+                       , MergeStatus mergeStatus, IDictionary<string, MergeResult<Sequence>> lowLevelResults
2376
 
                        , MergeStrategy mergeStrategy) : this(newHead, @base, mergedCommits, mergeStatus
2377
 
                        , mergeStrategy, lowLevelResults, null)
 
3345
                        , MergeStatus mergeStatus, MergeStrategy mergeStrategy, IDictionary<string, MergeResult
 
3346
-                       <object>> lowLevelResults) : this(newHead, @base, mergedCommits, mergeStatus, mergeStrategy
 
3347
+                       <Sequence>> lowLevelResults) : this(newHead, @base, mergedCommits, mergeStatus, mergeStrategy
 
3348
                        , lowLevelResults, null)
2378
3349
                {
2379
 
@@ -119,7 +119,7 @@ namespace NGit.Api
 
3350
                }
 
3351
@@ -120,7 +120,7 @@ namespace NGit.Api
2380
3352
                /// <param name="description">a user friendly description of the merge result</param>
2381
3353
                public MergeCommandResult(ObjectId newHead, ObjectId @base, ObjectId[] mergedCommits
2382
3354
                        , MergeStatus mergeStatus, MergeStrategy mergeStrategy, IDictionary<string, MergeResult
2383
3355
-                       <object>> lowLevelResults, string description) : this(newHead, @base, mergedCommits
2384
3356
+                       <Sequence>> lowLevelResults, string description) : this(newHead, @base, mergedCommits
2385
 
                        , mergeStatus, mergeStrategy, lowLevelResults, null, null)
 
3357
                        , mergeStatus, mergeStrategy, lowLevelResults, null, description)
2386
3358
                {
2387
3359
                }
2388
 
@@ -149,7 +149,7 @@ namespace NGit.Api
 
3360
@@ -150,7 +150,7 @@ namespace NGit.Api
2389
3361
                /// <param name="description">a user friendly description of the merge result</param>
2390
3362
                public MergeCommandResult(ObjectId newHead, ObjectId @base, ObjectId[] mergedCommits
2391
3363
                        , MergeStatus mergeStatus, MergeStrategy mergeStrategy, IDictionary<string, MergeResult
2394
3366
                         failingPaths, string description)
2395
3367
                {
2396
3368
                        this.newHead = newHead;
2397
 
@@ -161,7 +161,7 @@ namespace NGit.Api
 
3369
@@ -162,7 +162,7 @@ namespace NGit.Api
2398
3370
                        this.failingPaths = failingPaths;
2399
3371
                        if (lowLevelResults != null)
2400
3372
                        {
2403
3375
                                        ())
2404
3376
                                {
2405
3377
                                        AddConflict(result.Key, result.Value);
2406
 
@@ -352,21 +352,17 @@ namespace NGit.Api
 
3378
@@ -353,26 +353,26 @@ namespace NGit.Api
2407
3379
 
2408
3380
        public abstract class MergeStatus
2409
3381
        {
2410
3382
-               public static MergeStatus FAST_FORWARD = new MergeResult.MergeStatus.FAST_FORWARD_Class
2411
 
-                       ();
2412
 
+               public static MergeStatus FAST_FORWARD = new FAST_FORWARD_Class();
 
3383
+               public static MergeStatus FAST_FORWARD = new FAST_FORWARD_Class
 
3384
                        ();
 
3385
 
 
3386
-               public static MergeStatus FAST_FORWARD_SQUASHED = new MergeResult.MergeStatus.FAST_FORWARD_SQUASHED_Class
 
3387
+               public static MergeStatus FAST_FORWARD_SQUASHED = new FAST_FORWARD_SQUASHED_Class
 
3388
                        ();
2413
3389
 
2414
3390
-               public static MergeStatus ALREADY_UP_TO_DATE = new MergeResult.MergeStatus.ALREADY_UP_TO_DATE_Class
2415
 
-                       ();
2416
 
+               public static MergeStatus ALREADY_UP_TO_DATE = new ALREADY_UP_TO_DATE_Class();
 
3391
+               public static MergeStatus ALREADY_UP_TO_DATE = new ALREADY_UP_TO_DATE_Class
 
3392
                        ();
2417
3393
 
2418
3394
-               public static MergeStatus FAILED = new MergeResult.MergeStatus.FAILED_Class();
2419
3395
+               public static MergeStatus FAILED = new FAILED_Class();
2421
3397
-               public static MergeStatus MERGED = new MergeResult.MergeStatus.MERGED_Class();
2422
3398
+               public static MergeStatus MERGED = new MERGED_Class();
2423
3399
 
 
3400
-               public static MergeStatus MERGED_SQUASHED = new MergeResult.MergeStatus.MERGED_SQUASHED_Class
 
3401
+               public static MergeStatus MERGED_SQUASHED = new MERGED_SQUASHED_Class
 
3402
                        ();
 
3403
 
2424
3404
-               public static MergeStatus CONFLICTING = new MergeResult.MergeStatus.CONFLICTING_Class
2425
 
-                       ();
2426
 
+               public static MergeStatus CONFLICTING = new CONFLICTING_Class();
 
3405
+               public static MergeStatus CONFLICTING = new CONFLICTING_Class
 
3406
                        ();
2427
3407
 
2428
3408
-               public static MergeStatus NOT_SUPPORTED = new MergeResult.MergeStatus.NOT_SUPPORTED_Class
2429
 
-                       ();
2430
 
+               public static MergeStatus NOT_SUPPORTED = new NOT_SUPPORTED_Class();
 
3409
+               public static MergeStatus NOT_SUPPORTED = new NOT_SUPPORTED_Class
 
3410
                        ();
2431
3411
 
2432
3412
                internal class FAST_FORWARD_Class : MergeStatus
2433
 
                {
2434
3413
diff --git a/NGit/NGit.Api/PushCommand.cs b/NGit/NGit.Api/PushCommand.cs
2435
 
index 0188510..3cf5c04 100644
 
3414
index 0dd7c01..f433494 100644
2436
3415
--- a/NGit/NGit.Api/PushCommand.cs
2437
3416
+++ b/NGit/NGit.Api/PushCommand.cs
2438
 
@@ -138,7 +138,7 @@ namespace NGit.Api
 
3417
@@ -106,7 +106,7 @@ namespace NGit.Api
 
3418
                /// <exception cref="NGit.Api.Errors.InvalidRemoteException">when called with an invalid remote uri
 
3419
                ///     </exception>
 
3420
                /// <exception cref="NGit.Api.Errors.TransportException">when an error occurs with the transport
 
3421
-               ///     </exception>
 
3422
+               /// </exception>
 
3423
                /// <exception cref="NGit.Api.Errors.GitAPIException">NGit.Api.Errors.GitAPIException
 
3424
                ///     </exception>
 
3425
                public override Iterable<PushResult> Call()
 
3426
@@ -136,7 +136,7 @@ namespace NGit.Api
2439
3427
                                        }
2440
3428
                                }
2441
3429
                                IList<NGit.Transport.Transport> transports;
2444
3432
                                        );
2445
3433
                                foreach (NGit.Transport.Transport transport in transports)
2446
3434
                                {
2447
 
@@ -171,7 +171,7 @@ namespace NGit.Api
 
3435
@@ -153,9 +153,9 @@ namespace NGit.Api
 
3436
                                                PushResult result = transport.Push(monitor, toPush);
 
3437
                                                pushResults.AddItem(result);
 
3438
                                        }
 
3439
-                                       catch (TransportException e)
 
3440
+                                       catch (NGit.Errors.TransportException e)
 
3441
                                        {
 
3442
-                                               throw new TransportException(e.Message, e);
 
3443
+                                               throw new NGit.Errors.TransportException(e.Message, e);
 
3444
                                        }
 
3445
                                        finally
 
3446
                                        {
 
3447
@@ -168,11 +168,7 @@ namespace NGit.Api
2448
3448
                                throw new InvalidRemoteException(MessageFormat.Format(JGitText.Get().invalidRemote
2449
3449
                                        , remote));
2450
3450
                        }
 
3451
-                       catch (TransportException e)
 
3452
-                       {
 
3453
-                               throw new TransportException(e.Message, e);
 
3454
-                       }
2451
3455
-                       catch (NotSupportedException e)
2452
3456
+                       catch (NGit.Errors.NotSupportedException e)
2453
3457
                        {
2454
3458
                                throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfPushCommand
2455
3459
                                        , e);
2456
 
@@ -181,7 +181,7 @@ namespace NGit.Api
 
3460
@@ -182,7 +178,7 @@ namespace NGit.Api
2457
3461
                                throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfPushCommand
2458
3462
                                        , e);
2459
3463
                        }
2463
3467
 
2464
3468
                /// <summary>The remote (uri or name) used for the push operation.</summary>
2465
3469
diff --git a/NGit/NGit.Api/RebaseCommand.cs b/NGit/NGit.Api/RebaseCommand.cs
2466
 
index 04c5379..1281481 100644
 
3470
index 2c56e73..e14f768 100644
2467
3471
--- a/NGit/NGit.Api/RebaseCommand.cs
2468
3472
+++ b/NGit/NGit.Api/RebaseCommand.cs
2469
 
@@ -184,6 +184,7 @@ namespace NGit.Api
 
3473
@@ -203,6 +203,7 @@ namespace NGit.Api
2470
3474
                                                {
2471
3475
                                                        return res;
2472
3476
                                                }
2474
3478
                                        }
2475
3479
                                }
2476
3480
                                if (monitor.IsCancelled())
2477
 
@@ -262,6 +263,7 @@ namespace NGit.Api
 
3481
@@ -282,6 +283,7 @@ namespace NGit.Api
2478
3482
                                                                case CherryPickResult.CherryPickStatus.OK:
2479
3483
                                                                {
2480
3484
                                                                        newHead = cherryPickResult.GetNewHead();
2482
3486
                                                                }
2483
3487
                                                        }
2484
3488
                                                }
2485
 
@@ -1112,7 +1114,7 @@ namespace NGit.Api
 
3489
@@ -1175,7 +1177,7 @@ namespace NGit.Api
2486
3490
                                {
2487
3491
                                        return PICK;
2488
3492
                                }
2491
3495
                                        , token, PICK.ToToken()));
2492
3496
                        }
2493
3497
                }
 
3498
@@ -1195,7 +1197,7 @@ namespace NGit.Api
 
3499
 
 
3500
                        public override string ToString()
 
3501
                        {
 
3502
-                               return "Step[" + action + ", " + ((commit == null) ? "null" : commit) + ", " + ((
 
3503
+                               return "Step[" + action + ", " + ((commit == null) ? "null" : commit.ToString ()) + ", " + ((
 
3504
                                        shortMessage == null) ? "null" : Sharpen.Runtime.GetStringForBytes(shortMessage)
 
3505
                                        ) + "]";
 
3506
                        }
2494
3507
diff --git a/NGit/NGit.Api/ResetCommand.cs b/NGit/NGit.Api/ResetCommand.cs
2495
 
index 3377a85..1f29cba 100644
 
3508
index ece2c31..8417bb8 100644
2496
3509
--- a/NGit/NGit.Api/ResetCommand.cs
2497
3510
+++ b/NGit/NGit.Api/ResetCommand.cs
2498
3511
@@ -84,7 +84,7 @@ namespace NGit.Api
2505
3518
                private ICollection<string> filepaths = new List<string>();
2506
3519
 
2507
3520
diff --git a/NGit/NGit.Api/StashListCommand.cs b/NGit/NGit.Api/StashListCommand.cs
2508
 
index 186794b..9087991 100644
 
3521
index 87f4720..919f989 100644
2509
3522
--- a/NGit/NGit.Api/StashListCommand.cs
2510
3523
+++ b/NGit/NGit.Api/StashListCommand.cs
2511
 
@@ -73,7 +73,7 @@ namespace NGit.Api
 
3524
@@ -74,7 +74,7 @@ namespace NGit.Api
2512
3525
                        {
2513
3526
                                if (repo.GetRef(Constants.R_STASH) == null)
2514
3527
                                {
2517
3530
                                }
2518
3531
                        }
2519
3532
                        catch (IOException e)
2520
 
@@ -86,7 +86,7 @@ namespace NGit.Api
 
3533
@@ -87,7 +87,7 @@ namespace NGit.Api
2521
3534
                        ICollection<ReflogEntry> stashEntries = refLog.Call();
2522
3535
                        if (stashEntries.IsEmpty())
2523
3536
                        {
2589
3602
 
2590
3603
                /// <summary>
2591
3604
diff --git a/NGit/NGit.Diff/DiffAlgorithm.cs b/NGit/NGit.Diff/DiffAlgorithm.cs
2592
 
index efcf596..af77496 100644
 
3605
index 5dfcacc..dd6a705 100644
2593
3606
--- a/NGit/NGit.Diff/DiffAlgorithm.cs
2594
3607
+++ b/NGit/NGit.Diff/DiffAlgorithm.cs
2595
 
@@ -81,7 +81,7 @@ namespace NGit.Diff
 
3608
@@ -82,7 +82,7 @@ namespace NGit.Diff
2596
3609
                        {
2597
3610
                                case DiffAlgorithm.SupportedAlgorithm.MYERS:
2598
3611
                                {
2601
3614
                                }
2602
3615
 
2603
3616
                                case DiffAlgorithm.SupportedAlgorithm.HISTOGRAM:
2604
 
@@ -125,8 +125,8 @@ namespace NGit.Diff
 
3617
@@ -126,8 +126,8 @@ namespace NGit.Diff
2605
3618
                /// 's rules. The
2606
3619
                /// result list is never null.
2607
3620
                /// </returns>
2612
3625
                {
2613
3626
                        Edit region = cmp.ReduceCommonStartEnd(a, b, CoverEdit(a, b));
2614
3627
                        switch (region.GetType())
2615
 
@@ -140,9 +140,9 @@ namespace NGit.Diff
 
3628
@@ -141,9 +141,9 @@ namespace NGit.Diff
2616
3629
                                case Edit.Type.REPLACE:
2617
3630
                                {
2618
3631
                                        SubsequenceComparator<S> cs = new SubsequenceComparator<S>(cmp);
2625
3638
                                        // The last insertion may need to be shifted later if it
2626
3639
                                        // inserts elements that were previously reduced out as
2627
3640
                                        // common at the end.
2628
 
@@ -212,7 +212,7 @@ namespace NGit.Diff
 
3641
@@ -213,7 +213,7 @@ namespace NGit.Diff
2629
3642
                /// .
2630
3643
                /// </param>
2631
3644
                /// <returns>a modifiable edit list comparing the two sequences.</returns>
2658
3671
                                                        return DiffConfig.RenameDetectionType.TRUE;
2659
3672
                                                }
2660
3673
diff --git a/NGit/NGit.Diff/DiffFormatter.cs b/NGit/NGit.Diff/DiffFormatter.cs
2661
 
index 57e06b6..881c5eb 100644
 
3674
index a091242..692335d 100644
2662
3675
--- a/NGit/NGit.Diff/DiffFormatter.cs
2663
3676
+++ b/NGit/NGit.Diff/DiffFormatter.cs
2664
 
@@ -541,7 +541,7 @@ namespace NGit.Diff
 
3677
@@ -543,7 +543,7 @@ namespace NGit.Diff
2665
3678
                                        return Sharpen.Collections.SingletonList(ent);
2666
3679
                                }
2667
3680
                        }
2670
3683
                }
2671
3684
 
2672
3685
                private static bool IsRename(DiffEntry ent)
 
3686
diff --git a/NGit/NGit.Diff/EditList.cs b/NGit/NGit.Diff/EditList.cs
 
3687
index 83ba0fb..45e5fb4 100644
 
3688
--- a/NGit/NGit.Diff/EditList.cs
 
3689
+++ b/NGit/NGit.Diff/EditList.cs
 
3690
@@ -89,7 +89,7 @@ namespace NGit.Diff
 
3691
 
 
3692
                public override string ToString()
 
3693
                {
 
3694
-                       return "EditList" + base.ToString();
 
3695
+                       return "EditList[]";
 
3696
                }
 
3697
        }
 
3698
 }
2673
3699
diff --git a/NGit/NGit.Diff/HistogramDiff.cs b/NGit/NGit.Diff/HistogramDiff.cs
2674
 
index e6599f5..340f4bb 100644
 
3700
index bf6c6a1..d6d440d 100644
2675
3701
--- a/NGit/NGit.Diff/HistogramDiff.cs
2676
3702
+++ b/NGit/NGit.Diff/HistogramDiff.cs
2677
 
@@ -101,7 +101,7 @@ namespace NGit.Diff
 
3703
@@ -108,7 +108,7 @@ namespace NGit.Diff
2678
3704
        {
2679
3705
                /// <summary>Algorithm to use when there are too many element occurrences.</summary>
2680
3706
                /// <remarks>Algorithm to use when there are too many element occurrences.</remarks>
2683
3709
 
2684
3710
                /// <summary>Maximum number of positions to consider for a given element hash.</summary>
2685
3711
                /// <remarks>
2686
 
@@ -146,9 +146,9 @@ namespace NGit.Diff
 
3712
@@ -153,9 +153,9 @@ namespace NGit.Diff
2687
3713
                {
2688
3714
                        private readonly HashedSequenceComparator<S> cmp;
2689
3715
 
2695
3721
 
2696
3722
                        /// <summary>Result edits we have determined that must be made to convert a to b.</summary>
2697
3723
                        /// <remarks>Result edits we have determined that must be made to convert a to b.</remarks>
2698
 
@@ -197,10 +197,10 @@ namespace NGit.Diff
 
3724
@@ -204,10 +204,10 @@ namespace NGit.Diff
2699
3725
                                                if (this._enclosing.fallback != null)
2700
3726
                                                {
2701
3727
                                                        SubsequenceComparator<HashedSequence<S>> cs = this.Subcmp();
2723
3749
                {
2724
3750
                        HashedSequencePair<S> p = new HashedSequencePair<S>(cmp, a, b);
2725
3751
diff --git a/NGit/NGit.Diff/MyersDiff.cs b/NGit/NGit.Diff/MyersDiff.cs
2726
 
index 0e0b88e..abcd8ea 100644
 
3752
index bde2e53..232da21 100644
2727
3753
--- a/NGit/NGit.Diff/MyersDiff.cs
2728
3754
+++ b/NGit/NGit.Diff/MyersDiff.cs
2729
 
@@ -134,7 +134,7 @@ namespace NGit.Diff
 
3755
@@ -149,7 +149,7 @@ namespace NGit.Diff
2730
3756
                private MyersDiff(EditList edits, HashedSequenceComparator<S> cmp, HashedSequence
2731
3757
                        <S> a, HashedSequence<S> b, Edit region)
2732
3758
                {
2735
3761
                        this.edits = edits;
2736
3762
                        this.cmp = cmp;
2737
3763
                        this.a = a;
2738
 
@@ -142,7 +142,7 @@ namespace NGit.Diff
 
3764
@@ -157,7 +157,7 @@ namespace NGit.Diff
2739
3765
                        CalculateEdits(region);
2740
3766
                }
2741
3767
 
2744
3770
 
2745
3771
                // TODO: use ThreadLocal for future multi-threaded operations
2746
3772
                /// <summary>Entrypoint into the algorithm this class is all about.</summary>
2747
 
@@ -246,9 +246,9 @@ namespace NGit.Diff
 
3773
@@ -261,9 +261,9 @@ namespace NGit.Diff
2748
3774
                                }
2749
3775
                        }
2750
3776
 
2756
3782
 
2757
3783
                        protected internal int beginA;
2758
3784
 
2759
 
@@ -458,7 +458,7 @@ namespace NGit.Diff
 
3785
@@ -476,7 +476,7 @@ namespace NGit.Diff
2760
3786
                                private readonly MiddleEdit _enclosing;
2761
3787
                        }
2762
3788
 
2765
3791
                        {
2766
3792
                                internal sealed override int Snake(int k, int x)
2767
3793
                                {
2768
 
@@ -530,7 +530,7 @@ namespace NGit.Diff
 
3794
@@ -548,7 +548,7 @@ namespace NGit.Diff
2769
3795
                                private readonly MiddleEdit _enclosing;
2770
3796
                        }
2771
3797
 
2774
3800
                        {
2775
3801
                                internal sealed override int Snake(int k, int x)
2776
3802
                                {
2777
 
@@ -605,8 +605,8 @@ namespace NGit.Diff
 
3803
@@ -623,8 +623,8 @@ namespace NGit.Diff
2778
3804
                        public MiddleEdit(MyersDiff<S> _enclosing)
2779
3805
                        {
2780
3806
                                this._enclosing = _enclosing;
2786
3812
 
2787
3813
                        private readonly MyersDiff<S> _enclosing;
2788
3814
diff --git a/NGit/NGit.Dircache/DirCacheEntry.cs b/NGit/NGit.Dircache/DirCacheEntry.cs
2789
 
index 97f8cb8..4537ebb 100644
 
3815
index 882f703..6635653 100644
2790
3816
--- a/NGit/NGit.Dircache/DirCacheEntry.cs
2791
3817
+++ b/NGit/NGit.Dircache/DirCacheEntry.cs
2792
 
@@ -441,7 +441,7 @@ namespace NGit.Dircache
 
3818
@@ -445,7 +445,7 @@ namespace NGit.Dircache
2793
3819
                                }
2794
3820
                                else
2795
3821
                                {
2798
3824
                                }
2799
3825
                        }
2800
3826
                }
2801
 
@@ -464,7 +464,7 @@ namespace NGit.Dircache
 
3827
@@ -468,7 +468,7 @@ namespace NGit.Dircache
2802
3828
                                }
2803
3829
                                else
2804
3830
                                {
3028
4054
                                int srcIdx = this._enclosing.chunks.Get(this.idx++);
3029
4055
                                int begin = this._enclosing.chunks.Get(this.idx++);
3030
4056
diff --git a/NGit/NGit.Merge/ResolveMerger.cs b/NGit/NGit.Merge/ResolveMerger.cs
3031
 
index 46893ee..0dbc9db 100644
 
4057
index 58a62d3..875de5d 100644
3032
4058
--- a/NGit/NGit.Merge/ResolveMerger.cs
3033
4059
+++ b/NGit/NGit.Merge/ResolveMerger.cs
3034
 
@@ -428,7 +428,7 @@ namespace NGit.Merge
3035
 
                                                Add(tw.RawPath, theirs, DirCacheEntry.STAGE_3);
 
4060
@@ -472,7 +472,7 @@ namespace NGit.Merge
 
4061
                                                Add(tw.RawPath, theirs, DirCacheEntry.STAGE_3, 0, 0);
3036
4062
                                                unmergedPaths.AddItem(tw.PathString);
3037
4063
                                                mergeResults.Put(tw.PathString, new MergeResult<RawText>(Sharpen.Collections.EmptyList
3038
4064
-                                                       <RawText>()));
3040
4066
                                        }
3041
4067
                                        return true;
3042
4068
                                }
3043
 
@@ -554,7 +554,7 @@ namespace NGit.Merge
 
4069
@@ -610,7 +610,7 @@ namespace NGit.Merge
3044
4070
                                                }
3045
4071
                                                unmergedPaths.AddItem(tw.PathString);
3046
4072
                                                // generate a MergeResult for the deleted file
3049
4075
                                        }
3050
4076
                                }
3051
4077
                        }
3052
 
@@ -643,7 +643,7 @@ namespace NGit.Merge
3053
 
                                Add(tw.RawPath, @base, DirCacheEntry.STAGE_1);
3054
 
                                Add(tw.RawPath, ours, DirCacheEntry.STAGE_2);
3055
 
                                Add(tw.RawPath, theirs, DirCacheEntry.STAGE_3);
 
4078
@@ -703,7 +703,7 @@ namespace NGit.Merge
 
4079
                                Add(tw.RawPath, @base, DirCacheEntry.STAGE_1, 0, 0);
 
4080
                                Add(tw.RawPath, ours, DirCacheEntry.STAGE_2, 0, 0);
 
4081
                                Add(tw.RawPath, theirs, DirCacheEntry.STAGE_3, 0, 0);
3056
4082
-                               mergeResults.Put(tw.PathString, result);
3057
4083
+                               mergeResults.Put(tw.PathString, result.Upcast ());
3058
4084
                        }
3059
4085
                        else
3060
4086
                        {
3061
 
@@ -699,7 +699,7 @@ namespace NGit.Merge
 
4087
@@ -759,7 +759,7 @@ namespace NGit.Merge
3062
4088
                                {
3063
4089
                                        // TODO: This should be handled by WorkingTreeIterators which
3064
4090
                                        // support write operations
3066
4092
+                                       throw new NGit.Errors.NotSupportedException();
3067
4093
                                }
3068
4094
                                of = new FilePath(workTree, tw.PathString);
3069
 
                                fos = new FileOutputStream(of);
 
4095
                                FilePath parentFolder = of.GetParentFile();
3070
4096
diff --git a/NGit/NGit.Nls/GlobalBundleCache.cs b/NGit/NGit.Nls/GlobalBundleCache.cs
3071
4097
index f995104..9a728cb 100644
3072
4098
--- a/NGit/NGit.Nls/GlobalBundleCache.cs
3161
4187
 
3162
4188
                /// <returns>number of ancestor revisions mentioned in this diff.</returns>
3163
4189
diff --git a/NGit/NGit.Patch/FileHeader.cs b/NGit/NGit.Patch/FileHeader.cs
3164
 
index 4830480..95e81d3 100644
 
4190
index d7a8525..d159a38 100644
3165
4191
--- a/NGit/NGit.Patch/FileHeader.cs
3166
4192
+++ b/NGit/NGit.Patch/FileHeader.cs
3167
4193
@@ -349,7 +349,7 @@ namespace NGit.Patch
3174
4200
                        return hunks;
3175
4201
                }
3176
4202
diff --git a/NGit/NGit.Revplot/PlotCommit.cs b/NGit/NGit.Revplot/PlotCommit.cs
3177
 
index 6c8c3be..f3dcefc 100644
 
4203
index c683a6e..15e0ce6 100644
3178
4204
--- a/NGit/NGit.Revplot/PlotCommit.cs
3179
4205
+++ b/NGit/NGit.Revplot/PlotCommit.cs
3180
4206
@@ -53,7 +53,7 @@ namespace NGit.Revplot
3186
4212
        {
3187
4213
                internal static readonly NGit.Revplot.PlotCommit[] NO_CHILDREN = new NGit.Revplot.PlotCommit
3188
4214
                        [] {  };
3189
 
@@ -203,5 +203,63 @@ namespace NGit.Revplot
 
4215
@@ -213,5 +213,64 @@ namespace NGit.Revplot
3190
4216
                        lane = null;
3191
4217
                        base.Reset();
3192
4218
                }
3244
4270
+               void AddPassingLane(PlotLane c);
3245
4271
+               int ParentCount { get; }
3246
4272
+               PlotLane GetLane();
3247
 
+               
 
4273
+               ObjectId Id { get; }
 
4274
+
3248
4275
+               // Properties
3249
4276
+               PlotLane lane { get; set; }
3250
4277
+               Ref[] refs { get; set; }
3251
4278
        }
3252
4279
 }
3253
4280
diff --git a/NGit/NGit.Revplot/PlotCommitList.cs b/NGit/NGit.Revplot/PlotCommitList.cs
3254
 
index 3c0a366..7a771fb 100644
 
4281
index 1547bdb..2f20c7f 100644
3255
4282
--- a/NGit/NGit.Revplot/PlotCommitList.cs
3256
4283
+++ b/NGit/NGit.Revplot/PlotCommitList.cs
3257
4284
@@ -74,7 +74,7 @@ namespace NGit.Revplot
3264
4291
                public override void Clear()
3265
4292
                {
3266
4293
diff --git a/NGit/NGit.Revplot/PlotWalk.cs b/NGit/NGit.Revplot/PlotWalk.cs
3267
 
index d773832..4a3855c 100644
 
4294
index c5effed..0fb6004 100644
3268
4295
--- a/NGit/NGit.Revplot/PlotWalk.cs
3269
4296
+++ b/NGit/NGit.Revplot/PlotWalk.cs
3270
4297
@@ -105,7 +105,7 @@ namespace NGit.Revplot
3507
4534
                        if (c is NGit.Revwalk.RevFlagSet)
3508
4535
                        {
3509
4536
diff --git a/NGit/NGit.Revwalk/RevObjectList.cs b/NGit/NGit.Revwalk/RevObjectList.cs
3510
 
index 0b6ae30..5fd9c80 100644
 
4537
index 4a4d187..21aedd3 100644
3511
4538
--- a/NGit/NGit.Revwalk/RevObjectList.cs
3512
4539
+++ b/NGit/NGit.Revwalk/RevObjectList.cs
3513
4540
@@ -74,7 +74,7 @@ namespace NGit.Revwalk
3532
4559
                internal readonly int shift;
3533
4560
 
3534
4561
diff --git a/NGit/NGit.Revwalk/RevWalk.cs b/NGit/NGit.Revwalk/RevWalk.cs
3535
 
index 9359b88..2999376 100644
 
4562
index 778f34a..fd3c752 100644
3536
4563
--- a/NGit/NGit.Revwalk/RevWalk.cs
3537
4564
+++ b/NGit/NGit.Revwalk/RevWalk.cs
3538
 
@@ -1053,14 +1053,14 @@ namespace NGit.Revwalk
3539
 
                        Sharpen.Iterator<RevObject> objItr = have.Iterator();
3540
 
                        if (need.IsEmpty())
 
4565
@@ -1042,7 +1042,7 @@ namespace NGit.Revwalk
 
4566
                public virtual AsyncRevObjectQueue ParseAny<T>(Iterable<T> objectIds, bool reportMissing
 
4567
                        ) where T:ObjectId
 
4568
                {
 
4569
-                       IList<T> need = new AList<T>();
 
4570
+                       IList<ObjectId> need = new AList<ObjectId>();
 
4571
                        IList<RevObject> have = new AList<RevObject>();
 
4572
                        foreach (T id in objectIds)
3541
4573
                        {
3542
 
-                               return new _AsyncRevObjectQueue_898(objItr);
3543
 
+                               return new _AsyncRevObjectQueue_898<T>(objItr);
 
4574
@@ -1062,7 +1062,7 @@ namespace NGit.Revwalk
 
4575
                                return new _AsyncRevObjectQueue_902(objItr);
3544
4576
                        }
3545
4577
                        // In-memory only, no action required.
3546
 
                        AsyncObjectLoaderQueue<T> lItr = reader.Open(need.AsIterable(), reportMissing);
3547
 
-                       return new _AsyncRevObjectQueue_914(this, objItr, lItr);
3548
 
+                       return new _AsyncRevObjectQueue_914<T>(this, objItr, lItr);
 
4578
-                       AsyncObjectLoaderQueue<T> lItr = reader.Open(need.AsIterable(), reportMissing);
 
4579
+                       AsyncObjectLoaderQueue<ObjectId> lItr = reader.Open(need.AsIterable(), reportMissing);
 
4580
                        return new _AsyncRevObjectQueue_918(this, objItr, lItr);
3549
4581
                }
3550
4582
 
3551
 
-               private sealed class _AsyncRevObjectQueue_898 : AsyncRevObjectQueue
3552
 
+               private sealed class _AsyncRevObjectQueue_898<T> : AsyncRevObjectQueue where T:ObjectId
 
4583
@@ -1093,7 +1093,7 @@ namespace NGit.Revwalk
 
4584
                private sealed class _AsyncRevObjectQueue_918 : AsyncRevObjectQueue
3553
4585
                {
3554
 
                        public _AsyncRevObjectQueue_898(Sharpen.Iterator<RevObject> objItr)
 
4586
                        public _AsyncRevObjectQueue_918(RevWalk _enclosing, Sharpen.Iterator<RevObject> objItr
 
4587
-                               , AsyncObjectLoaderQueue<T> lItr)
 
4588
+                              , AsyncObjectLoaderQueue<ObjectId> lItr)
3555
4589
                        {
3556
 
@@ -1084,7 +1084,7 @@ namespace NGit.Revwalk
 
4590
                                this._enclosing = _enclosing;
 
4591
                                this.objItr = objItr;
 
4592
@@ -1157,7 +1157,7 @@ namespace NGit.Revwalk
 
4593
 
3557
4594
                        private readonly Sharpen.Iterator<RevObject> objItr;
 
4595
 
 
4596
-                       private readonly AsyncObjectLoaderQueue<T> lItr;
 
4597
+                       private readonly AsyncObjectLoaderQueue<ObjectId> lItr;
3558
4598
                }
3559
4599
 
3560
 
-               private sealed class _AsyncRevObjectQueue_914 : AsyncRevObjectQueue
3561
 
+               private sealed class _AsyncRevObjectQueue_914<T> : AsyncRevObjectQueue where T:ObjectId
3562
 
                {
3563
 
                        public _AsyncRevObjectQueue_914(RevWalk _enclosing, Sharpen.Iterator<RevObject> objItr
3564
 
                                , AsyncObjectLoaderQueue<T> lItr)
3565
 
@@ -1551,7 +1551,7 @@ namespace NGit.Revwalk
 
4600
                /// <summary>Ensure the object's critical headers have been parsed.</summary>
 
4601
@@ -1557,7 +1557,7 @@ namespace NGit.Revwalk
3566
4602
 
3567
4603
                        public override void Remove()
3568
4604
                        {
3584
4620
 
3585
4621
                /// <summary>
3586
4622
                /// True once
 
4623
diff --git a/NGit/NGit.Storage.File/GC.cs b/NGit/NGit.Storage.File/GC.cs
 
4624
index 236894c..9592305 100644
 
4625
--- a/NGit/NGit.Storage.File/GC.cs
 
4626
+++ b/NGit/NGit.Storage.File/GC.cs
 
4627
@@ -76,7 +76,7 @@ namespace NGit.Storage.File
 
4628
 
 
4629
                private long expireAgeMillis = -1;
 
4630
 
 
4631
-               private DateTime expire;
 
4632
+               private DateTime? expire;
 
4633
 
 
4634
                /// <summary>
 
4635
                /// the refs which existed during the last call to
 
4636
@@ -173,6 +173,7 @@ namespace NGit.Storage.File
 
4637
                        }
 
4638
                        foreach (PackFile oldPack in oldPacks)
 
4639
                        {
 
4640
+                               bool retainPack = false;
 
4641
                                string oldName = oldPack.GetPackName();
 
4642
                                // check whether an old pack file is also among the list of new
 
4643
                                // pack files. Then we must not delete it.
 
4644
@@ -180,17 +181,18 @@ namespace NGit.Storage.File
 
4645
                                {
 
4646
                                        if (oldName.Equals(newPack.GetPackName()))
 
4647
                                        {
 
4648
-                                               goto oldPackLoop_continue;
 
4649
+                                               retainPack = true;
 
4650
+                                               break;
 
4651
                                        }
 
4652
                                }
 
4653
-                               if (!oldPack.ShouldBeKept())
 
4654
+                               if (!retainPack && !oldPack.ShouldBeKept())
 
4655
                                {
 
4656
                                        oldPack.Close();
 
4657
                                        FileUtils.Delete(NameFor(oldName, ".pack"), deleteOptions);
 
4658
                                        FileUtils.Delete(NameFor(oldName, ".idx"), deleteOptions);
 
4659
                                }
 
4660
                        }
 
4661
-oldPackLoop_break: ;
 
4662
+
 
4663
                        // close the complete object database. Thats my only chance to force
 
4664
                        // rescanning and to detect that certain pack files are now deleted.
 
4665
                        ((ObjectDirectory)repo.ObjectDatabase).Close();
 
4666
@@ -302,7 +304,7 @@ oldPackLoop_break: ;
 
4667
                        }
 
4668
                        if (expire != null)
 
4669
                        {
 
4670
-                               expireDate = expire.GetTime();
 
4671
+                               expireDate = expire.Value.GetTime();
 
4672
                        }
 
4673
                        if (expireAgeMillis != -1)
 
4674
                        {
 
4675
@@ -717,12 +719,12 @@ oldPackLoop_break: ;
 
4676
                        {
 
4677
                                if (repo.GetIndexFile() == null)
 
4678
                                {
 
4679
-                                       return Sharpen.Collections.EmptySet();
 
4680
+                                       return Sharpen.Collections.EmptySet<ObjectId>();
 
4681
                                }
 
4682
                        }
 
4683
                        catch (NoWorkTreeException)
 
4684
                        {
 
4685
-                               return Sharpen.Collections.EmptySet();
 
4686
+                               return Sharpen.Collections.EmptySet<ObjectId>();
 
4687
                        }
 
4688
                        TreeWalk treeWalk = new TreeWalk(repo);
 
4689
                        try
3587
4690
diff --git a/NGit/NGit.Storage.File/ObjectDirectory.cs b/NGit/NGit.Storage.File/ObjectDirectory.cs
3588
4691
index 94139a3..0cc1ee4 100644
3589
4692
--- a/NGit/NGit.Storage.File/ObjectDirectory.cs
3619
4722
                }
3620
4723
 
3621
4724
diff --git a/NGit/NGit.Storage.File/PackIndex.cs b/NGit/NGit.Storage.File/PackIndex.cs
3622
 
index 8dbebbc..6ab7480 100644
 
4725
index 29f7713..54a2a3f 100644
3623
4726
--- a/NGit/NGit.Storage.File/PackIndex.cs
3624
4727
+++ b/NGit/NGit.Storage.File/PackIndex.cs
3625
4728
@@ -367,12 +367,12 @@ namespace NGit.Storage.File
3646
4749
                        }
3647
4750
 
3648
4751
diff --git a/NGit/NGit.Storage.File/PackIndexWriter.cs b/NGit/NGit.Storage.File/PackIndexWriter.cs
3649
 
index 79f8601..fabfc7f 100644
 
4752
index ccb58de..f69df3c 100644
3650
4753
--- a/NGit/NGit.Storage.File/PackIndexWriter.cs
3651
4754
+++ b/NGit/NGit.Storage.File/PackIndexWriter.cs
3652
4755
@@ -226,7 +226,7 @@ LOOP_break: ;
3659
4762
                        WriteImpl();
3660
4763
                        @out.Flush();
3661
4764
diff --git a/NGit/NGit.Storage.File/RefDirectory.cs b/NGit/NGit.Storage.File/RefDirectory.cs
3662
 
index e48248e..2821ea5 100644
 
4765
index 9e8c087..f4a17de 100644
3663
4766
--- a/NGit/NGit.Storage.File/RefDirectory.cs
3664
4767
+++ b/NGit/NGit.Storage.File/RefDirectory.cs
3665
 
@@ -334,7 +334,7 @@ namespace NGit.Storage.File
 
4768
@@ -345,7 +345,7 @@ namespace NGit.Storage.File
3666
4769
 
3667
4770
                private RefList<Ref> Upcast<_T0>(RefList<_T0> loose) where _T0:Ref
3668
4771
                {
3671
4774
                }
3672
4775
 
3673
4776
                private class LooseScanner
3674
 
@@ -1006,7 +1006,7 @@ namespace NGit.Storage.File
 
4777
@@ -1160,7 +1160,7 @@ namespace NGit.Storage.File
3675
4778
                                }
3676
4779
                                // possibly truncated ref
3677
4780
                                // trim trailing whitespace
3680
4783
                                {
3681
4784
                                        n--;
3682
4785
                                }
3683
 
@@ -1043,7 +1043,7 @@ namespace NGit.Storage.File
 
4786
@@ -1197,14 +1197,13 @@ namespace NGit.Storage.File
3684
4787
                        }
3685
 
                        catch (ArgumentException)
 
4788
                        catch (ArgumentException notRef)
3686
4789
                        {
3687
4790
-                               while (0 < n && char.IsWhiteSpace(buf[n - 1]))
3688
4791
+                               while (0 < n && char.IsWhiteSpace((char)buf[n - 1]))
3689
4792
                                {
3690
4793
                                        n--;
3691
4794
                                }
3692
 
@@ -1255,7 +1255,7 @@ namespace NGit.Storage.File
 
4795
                                string content = RawParseUtils.Decode(buf, 0, n);
 
4796
                                IOException ioException = new IOException(MessageFormat.Format(JGitText.Get().notARef
 
4797
-                                       , name, content));
 
4798
-                               Sharpen.Extensions.InitCause(ioException, notRef);
 
4799
+                                       , name, content), notRef);
 
4800
                                throw ioException;
 
4801
                        }
 
4802
                        return new RefDirectory.LooseUnpeeled(otherSnapshot, name, id);
 
4803
@@ -1414,7 +1413,7 @@ namespace NGit.Storage.File
3693
4804
                        public RefDirectory.LooseRef Peel(ObjectIdRef newLeaf)
3694
4805
                        {
3695
4806
                                // We should never try to peel the symbolic references.
3836
4947
                                {
3837
4948
                                        curcmd = Next();
3838
4949
diff --git a/NGit/NGit.Storage.Pack/DeltaWindow.cs b/NGit/NGit.Storage.Pack/DeltaWindow.cs
3839
 
index b36e358..2b04f8d 100644
 
4950
index 9577942..7cdfd6f 100644
3840
4951
--- a/NGit/NGit.Storage.Pack/DeltaWindow.cs
3841
4952
+++ b/NGit/NGit.Storage.Pack/DeltaWindow.cs
3842
4953
@@ -624,7 +624,7 @@ namespace NGit.Storage.Pack
3849
4960
                }
3850
4961
        }
3851
4962
diff --git a/NGit/NGit.Storage.Pack/PackWriter.cs b/NGit/NGit.Storage.Pack/PackWriter.cs
3852
 
index 97f2ccf..5ba5e9f 100644
 
4963
index 66bdfff..d91f429 100644
3853
4964
--- a/NGit/NGit.Storage.Pack/PackWriter.cs
3854
4965
+++ b/NGit/NGit.Storage.Pack/PackWriter.cs
3855
4966
@@ -166,7 +166,7 @@ namespace NGit.Storage.Pack
4132
5243
                                                        if (obj_1 is RevCommit && obj_1.Has(include) && !obj_1.Has(RevFlag.UNINTERESTING)
4133
5244
                                                                 && !obj_1.Has(added))
4134
5245
                                                        {
4135
 
@@ -2642,7 +2636,7 @@ namespace NGit.Storage.Pack
 
5246
@@ -2644,7 +2638,7 @@ namespace NGit.Storage.Pack
4136
5247
 
4137
5248
                        private readonly long totalDeltaSearchBytes;
4138
5249
 
4141
5252
 
4142
5253
                        public MutableState(PackWriter _enclosing)
4143
5254
                        {
4144
 
@@ -2685,7 +2679,7 @@ namespace NGit.Storage.Pack
 
5255
@@ -2687,7 +2681,7 @@ namespace NGit.Storage.Pack
4145
5256
                                {
4146
5257
                                        bytesUsed += this.totalDeltaSearchBytes;
4147
5258
                                }
4240
5351
                /// <summary>Create and configure a new UploadPack instance for a repository.</summary>
4241
5352
                /// <remarks>Create and configure a new UploadPack instance for a repository.</remarks>
4242
5353
diff --git a/NGit/NGit.Transport/AdvertiseRefsHook.cs b/NGit/NGit.Transport/AdvertiseRefsHook.cs
4243
 
index 34619f4..f8a0396 100644
 
5354
index 136fca0..b5c7bc6 100644
4244
5355
--- a/NGit/NGit.Transport/AdvertiseRefsHook.cs
4245
5356
+++ b/NGit/NGit.Transport/AdvertiseRefsHook.cs
4246
 
@@ -80,7 +80,7 @@ namespace NGit.Transport
 
5357
@@ -81,7 +81,7 @@ namespace NGit.Transport
4247
5358
                ///     </see>
4248
5359
                /// .
4249
5360
                /// </remarks>
4250
 
-               public const AdvertiseRefsHook DEFAULT = new _AdvertiseRefsHook_54();
4251
 
+               public static AdvertiseRefsHook DEFAULT = new _AdvertiseRefsHook_54();
 
5361
-               public const AdvertiseRefsHook DEFAULT = new _AdvertiseRefsHook_58();
 
5362
+               public static readonly AdvertiseRefsHook DEFAULT = new _AdvertiseRefsHook_58();
4252
5363
 
4253
5364
                // Do nothing.
4254
5365
                /// <summary>Advertise refs for upload-pack.</summary>
4255
5366
diff --git a/NGit/NGit.Transport/AmazonS3.cs b/NGit/NGit.Transport/AmazonS3.cs
4256
 
index 3371446..e69de29 100644
 
5367
index 74f8d57..e69de29 100644
4257
5368
--- a/NGit/NGit.Transport/AmazonS3.cs
4258
5369
+++ b/NGit/NGit.Transport/AmazonS3.cs
4259
 
@@ -1,903 +0,0 @@
 
5370
@@ -1,904 +0,0 @@
4260
5371
-/*
4261
5372
-This code is derived from jgit (http://eclipse.org/jgit).
4262
5373
-Copyright owners are documented in jgit's IP log.
4869
5980
-               private IOException Error(string action, string key, HttpURLConnection c)
4870
5981
-               {
4871
5982
-                       IOException err = new IOException(MessageFormat.Format(JGitText.Get().amazonS3ActionFailed
4872
 
-                               , action, key, HttpSupport.Response(c), c.GetResponseMessage()));
 
5983
-                               , action, key, Sharpen.Extensions.ValueOf(HttpSupport.Response(c)), c.GetResponseMessage
 
5984
-                               ()));
4873
5985
-                       InputStream errorStream = c.GetErrorStream();
4874
5986
-                       if (errorStream == null)
4875
5987
-                       {
4901
6013
-               private IOException MaxAttempts(string action, string key)
4902
6014
-               {
4903
6015
-                       return new IOException(MessageFormat.Format(JGitText.Get().amazonS3ActionFailedGivingUp
4904
 
-                               , action, key, maxAttempts));
 
6016
-                               , action, key, Sharpen.Extensions.ValueOf(maxAttempts)));
4905
6017
-               }
4906
6018
-
4907
6019
-               /// <exception cref="System.IO.IOException"></exception>
5174
6286
                private bool startedOperation;
5175
6287
 
5176
6288
diff --git a/NGit/NGit.Transport/BasePackFetchConnection.cs b/NGit/NGit.Transport/BasePackFetchConnection.cs
5177
 
index 96a13c2..afc6e1a 100644
 
6289
index 3420729..c4a7516 100644
5178
6290
--- a/NGit/NGit.Transport/BasePackFetchConnection.cs
5179
6291
+++ b/NGit/NGit.Transport/BasePackFetchConnection.cs
5180
 
@@ -718,7 +718,7 @@ SEND_HAVES_break: ;
 
6292
@@ -728,7 +728,7 @@ SEND_HAVES_break: ;
5181
6293
                                                // A solitary ACK at this point means the remote won't
5182
6294
                                                // speak anymore, but is going to send us a pack now.
5183
6295
                                                //
5186
6298
                                        }
5187
6299
 
5188
6300
                                        case PacketLineIn.AckNackResult.ACK_CONTINUE:
5189
 
@@ -737,7 +737,7 @@ SEND_HAVES_break: ;
 
6301
@@ -747,7 +747,7 @@ SEND_HAVES_break: ;
5190
6302
                                }
5191
6303
 READ_RESULT_continue: ;
5192
6304
                        }
5196
6308
 
5197
6309
                /// <exception cref="System.IO.IOException"></exception>
5198
6310
diff --git a/NGit/NGit.Transport/BasePackPushConnection.cs b/NGit/NGit.Transport/BasePackPushConnection.cs
5199
 
index b3a99b1..f93892a 100644
 
6311
index 235a18c..c53c1b1 100644
5200
6312
--- a/NGit/NGit.Transport/BasePackPushConnection.cs
5201
6313
+++ b/NGit/NGit.Transport/BasePackPushConnection.cs
5202
 
@@ -147,7 +147,7 @@ namespace NGit.Transport
 
6314
@@ -151,7 +151,7 @@ namespace NGit.Transport
5203
6315
                        {
5204
6316
                                transport.OpenFetch().Close();
5205
6317
                        }
5208
6320
                        {
5209
6321
                        }
5210
6322
                        catch (NoRemoteRepositoryException e)
 
6323
@@ -200,7 +200,7 @@ namespace NGit.Transport
 
6324
                                                if (0 <= b)
 
6325
                                                {
 
6326
                                                        throw new TransportException(uri, MessageFormat.Format(JGitText.Get().expectedEOFReceived
 
6327
-                                                               , char.ValueOf((char)b)));
 
6328
+                                                               , (char)b));
 
6329
                                                }
 
6330
                                        }
 
6331
                                }
 
6332
diff --git a/NGit/NGit.Transport/BaseReceivePack.cs b/NGit/NGit.Transport/BaseReceivePack.cs
 
6333
index a763b53..1a5bb59 100644
 
6334
--- a/NGit/NGit.Transport/BaseReceivePack.cs
 
6335
+++ b/NGit/NGit.Transport/BaseReceivePack.cs
 
6336
@@ -1408,7 +1408,7 @@ namespace NGit.Transport
 
6337
                /// <param name="out">the reporter for sending the status strings.</param>
 
6338
                /// <exception cref="System.IO.IOException">an error occurred writing the status report.
 
6339
                ///     </exception>
 
6340
-               protected internal virtual void SendStatusReport(bool forClient, Exception unpackError
 
6341
+                internal virtual void SendStatusReport(bool forClient, Exception unpackError
 
6342
                        , BaseReceivePack.Reporter @out)
 
6343
                {
 
6344
                        if (unpackError != null)
5211
6345
diff --git a/NGit/NGit.Transport/Daemon.cs b/NGit/NGit.Transport/Daemon.cs
5212
6346
index ab08742..014255b 100644
5213
6347
--- a/NGit/NGit.Transport/Daemon.cs
5418
6552
                internal enum AckNackResult
5419
6553
                {
5420
6554
diff --git a/NGit/NGit.Transport/PostReceiveHook.cs b/NGit/NGit.Transport/PostReceiveHook.cs
5421
 
index af35c2c..e92be9c 100644
 
6555
index fc3c2d1..5e7f433 100644
5422
6556
--- a/NGit/NGit.Transport/PostReceiveHook.cs
5423
6557
+++ b/NGit/NGit.Transport/PostReceiveHook.cs
5424
6558
@@ -83,7 +83,7 @@ namespace NGit.Transport
5431
6565
                // Do nothing.
5432
6566
                /// <summary>Invoked after all commands are executed and status has been returned.</summary>
5433
6567
diff --git a/NGit/NGit.Transport/PreReceiveHook.cs b/NGit/NGit.Transport/PreReceiveHook.cs
5434
 
index 9c4bf2d..e292814 100644
 
6568
index c6d82b5..ec569f3 100644
5435
6569
--- a/NGit/NGit.Transport/PreReceiveHook.cs
5436
6570
+++ b/NGit/NGit.Transport/PreReceiveHook.cs
5437
6571
@@ -100,7 +100,7 @@ namespace NGit.Transport
5539
6673
                        }
5540
6674
                        else
5541
6675
                        {
 
6676
diff --git a/NGit/NGit.Transport/TrackingRefUpdate.cs b/NGit/NGit.Transport/TrackingRefUpdate.cs
 
6677
index 47a1df5..9533dcf 100644
 
6678
--- a/NGit/NGit.Transport/TrackingRefUpdate.cs
 
6679
+++ b/NGit/NGit.Transport/TrackingRefUpdate.cs
 
6680
@@ -141,8 +141,8 @@ namespace NGit.Transport
 
6681
 
 
6682
                internal sealed class Command : ReceiveCommand
 
6683
                {
 
6684
-                       public Command(TrackingRefUpdate _enclosing) : base(this._enclosing.oldObjectId, 
 
6685
-                               this._enclosing.newObjectId, this._enclosing.localName)
 
6686
+                       public Command(TrackingRefUpdate _enclosing) : base(_enclosing.oldObjectId, 
 
6687
+                               _enclosing.newObjectId, _enclosing.localName)
 
6688
                        {
 
6689
                                this._enclosing = _enclosing;
 
6690
                        }
5542
6691
diff --git a/NGit/NGit.Transport/Transport.cs b/NGit/NGit.Transport/Transport.cs
5543
 
index eebc53b..47e1c3d 100644
 
6692
index 5c21525..e0a3df9 100644
5544
6693
--- a/NGit/NGit.Transport/Transport.cs
5545
6694
+++ b/NGit/NGit.Transport/Transport.cs
5546
6695
@@ -51,7 +51,6 @@ using NGit.Internal;
5551
6700
 
5552
6701
 namespace NGit.Transport
5553
6702
 {
5554
 
@@ -87,16 +86,16 @@ namespace NGit.Transport
 
6703
@@ -87,15 +86,15 @@ namespace NGit.Transport
5555
6704
                        // Registration goes backwards in order of priority.
5556
6705
                        Register(TransportLocal.PROTO_LOCAL);
5557
6706
                        Register(TransportBundleFile.PROTO_BUNDLE);
5565
6714
-                       RegisterByService();
5566
6715
+//                     RegisterByService();
5567
6716
                }
5568
 
 
5569
 
-               private static void RegisterByService()
5570
 
+/*             private static void RegisterByService()
 
6717
-
 
6718
+               /*
 
6719
                private static void RegisterByService()
5571
6720
                {
5572
6721
                        ClassLoader ldr = Sharpen.Thread.CurrentThread().GetContextClassLoader();
5573
 
                        if (ldr == null)
5574
6722
@@ -218,6 +217,7 @@ namespace NGit.Transport
5575
6723
                                }
5576
6724
                        }
5588
6736
                                , uri));
5589
6737
                }
5590
6738
 
5591
 
@@ -659,7 +659,7 @@ namespace NGit.Transport
 
6739
@@ -648,7 +648,7 @@ namespace NGit.Transport
 
6740
                                        return proto.Open(uri);
 
6741
                                }
 
6742
                        }
 
6743
-                       throw new NotSupportedException(MessageFormat.Format(JGitText.Get().URINotSupported
 
6744
+                       throw new NGit.Errors.NotSupportedException(MessageFormat.Format(JGitText.Get().URINotSupported
 
6745
                                , uri));
 
6746
                }
 
6747
 
 
6748
@@ -684,7 +684,7 @@ namespace NGit.Transport
5592
6749
                {
5593
6750
                        if (fetchSpecs == null)
5594
6751
                        {
5597
6754
                        }
5598
6755
                        IList<RemoteRefUpdate> result = new List<RemoteRefUpdate>();
5599
6756
                        ICollection<RefSpec> procRefs = ExpandPushWildcardsFor(db, specs);
5600
 
@@ -787,7 +787,7 @@ namespace NGit.Transport
 
6757
@@ -812,7 +812,7 @@ namespace NGit.Transport
5601
6758
 
5602
6759
                /// <summary>Specifications to apply during fetch.</summary>
5603
6760
                /// <remarks>Specifications to apply during fetch.</remarks>
5606
6763
 
5607
6764
                /// <summary>
5608
6765
                /// How
5609
 
@@ -815,7 +815,7 @@ namespace NGit.Transport
 
6766
@@ -840,7 +840,7 @@ namespace NGit.Transport
5610
6767
 
5611
6768
                /// <summary>Specifications to apply during push.</summary>
5612
6769
                /// <remarks>Specifications to apply during push.</remarks>
6199
7356
                                this._enclosing = _enclosing;
6200
7357
                                try
6201
7358
diff --git a/NGit/NGit.Transport/TransportHttp.cs b/NGit/NGit.Transport/TransportHttp.cs
6202
 
index b37dd7c..e80e1c4 100644
 
7359
index dc7af6c..d5b058f 100644
6203
7360
--- a/NGit/NGit.Transport/TransportHttp.cs
6204
7361
+++ b/NGit/NGit.Transport/TransportHttp.cs
6205
7362
@@ -48,8 +48,8 @@ using System.Reflection;
6212
7369
 using NGit.Transport;
6213
7370
 using NGit.Util;
6214
7371
 using NGit.Util.IO;
6215
 
@@ -257,7 +257,7 @@ namespace NGit.Transport
 
7372
@@ -135,7 +135,7 @@ namespace NGit.Transport
 
7373
                        public override NGit.Transport.Transport Open(URIish uri)
 
7374
                        {
 
7375
                                return new NGit.Transport.TransportHttp(uri);
 
7376
-                       }
 
7377
+               }
 
7378
                }
 
7379
 
 
7380
                internal static readonly TransportProtocol PROTO_HTTP = new _TransportProtocol_137
 
7381
@@ -234,7 +234,7 @@ namespace NGit.Transport
 
7382
 
 
7383
                        public HttpConfig() : this(new Config())
 
7384
                        {
 
7385
-                       }
 
7386
+               }
 
7387
                }
 
7388
 
 
7389
                private readonly Uri baseUrl;
 
7390
@@ -267,7 +267,7 @@ namespace NGit.Transport
6216
7391
                        catch (UriFormatException e)
6217
7392
                        {
6218
7393
                                //$NON-NLS-1$
6221
7396
                                        ), e);
6222
7397
                        }
6223
7398
                        http = local.GetConfig().Get(HTTP_KEY);
6224
 
@@ -311,7 +311,7 @@ namespace NGit.Transport
 
7399
@@ -295,7 +295,7 @@ namespace NGit.Transport
 
7400
                        catch (UriFormatException e)
 
7401
                        {
 
7402
                                //$NON-NLS-1$
 
7403
-                               throw new NotSupportedException(MessageFormat.Format(JGitText.Get().invalidURL, uri
 
7404
+                               throw new NGit.Errors.NotSupportedException(MessageFormat.Format(JGitText.Get().invalidURL, uri
 
7405
                                        ), e);
 
7406
                        }
 
7407
                        http = new TransportHttp.HttpConfig();
 
7408
@@ -349,7 +349,7 @@ namespace NGit.Transport
6225
7409
                                        @in.Close();
6226
7410
                                }
6227
7411
                        }
6230
7414
                        {
6231
7415
                                throw;
6232
7416
                        }
6233
 
@@ -427,12 +427,12 @@ namespace NGit.Transport
 
7417
@@ -465,12 +465,12 @@ namespace NGit.Transport
6234
7418
                                                if (!useSmartHttp)
6235
7419
                                                {
6236
7420
                                                        string msg = JGitText.Get().smartHTTPPushDisabled;
6245
7429
                                                }
6246
7430
                                        }
6247
7431
                                }
6248
 
@@ -441,7 +441,7 @@ namespace NGit.Transport
 
7432
@@ -479,7 +479,7 @@ namespace NGit.Transport
6249
7433
                                        @in.Close();
6250
7434
                                }
6251
7435
                        }
6254
7438
                        {
6255
7439
                                throw;
6256
7440
                        }
6257
 
@@ -486,7 +486,7 @@ namespace NGit.Transport
 
7441
@@ -524,7 +524,7 @@ namespace NGit.Transport
6258
7442
                        }
6259
7443
                        catch (UriFormatException e)
6260
7444
                        {
6263
7447
                                        ), e);
6264
7448
                        }
6265
7449
                        try
6266
 
@@ -553,7 +553,7 @@ namespace NGit.Transport
 
7450
@@ -591,7 +591,7 @@ namespace NGit.Transport
6267
7451
                                        }
6268
7452
                                }
6269
7453
                        }
6272
7456
                        {
6273
7457
                                throw;
6274
7458
                        }
6275
 
@@ -716,7 +716,7 @@ namespace NGit.Transport
 
7459
@@ -685,7 +685,7 @@ namespace NGit.Transport
 
7460
                        string expType = "application/x-" + service + "-advertisement";
 
7461
                        //$NON-NLS-1$ //$NON-NLS-2$
 
7462
                        string actType = c.GetContentType();
 
7463
-                       return expType.Equals(actType);
 
7464
+                       return expType.Contains(actType);
 
7465
                }
 
7466
 
 
7467
                /// <exception cref="System.IO.IOException"></exception>
 
7468
@@ -759,7 +759,7 @@ namespace NGit.Transport
6276
7469
                        /// <exception cref="System.IO.IOException"></exception>
6277
7470
                        internal override WalkRemoteObjectDatabase OpenAlternate(string location)
6278
7471
                        {
6281
7474
                        }
6282
7475
 
6283
7476
                        /// <exception cref="System.IO.IOException"></exception>
6284
 
@@ -868,7 +868,7 @@ namespace NGit.Transport
 
7477
@@ -911,7 +911,7 @@ namespace NGit.Transport
6285
7478
 
6286
7479
                        /// <exception cref="NGit.Errors.TransportException"></exception>
6287
7480
                        internal SmartHttpFetchConnection(TransportHttp _enclosing, InputStream advertisement
6290
7483
                        {
6291
7484
                                this._enclosing = _enclosing;
6292
7485
                                this.statelessRPC = true;
6293
 
@@ -883,10 +883,10 @@ namespace NGit.Transport
 
7486
@@ -926,11 +926,11 @@ namespace NGit.Transport
6294
7487
                        {
6295
7488
                                try
6296
7489
                                {
6297
 
-                                       this.svc = new TransportHttp.Service(this, TransportHttp.SVC_UPLOAD_PACK);
6298
 
+                                       this.svc = new TransportHttp.Service(_enclosing, TransportHttp.SVC_UPLOAD_PACK);
6299
 
                                        this.Init(this.svc.@in, this.svc.@out);
 
7490
-                                       this.svc = new TransportHttp.MultiRequestService(this, TransportHttp.SVC_UPLOAD_PACK
 
7491
+                                       this.svc = new TransportHttp.MultiRequestService(_enclosing, TransportHttp.SVC_UPLOAD_PACK
 
7492
                                                );
 
7493
                                        this.Init(this.svc.GetInputStream(), this.svc.GetOutputStream());
6300
7494
-                                       base.DoFetch(monitor, want, have);
6301
7495
-                               }
6302
7496
+                               base.DoFetch(monitor, want, have);
6304
7498
                                finally
6305
7499
                                {
6306
7500
                                        this.svc = null;
6307
 
@@ -905,7 +905,7 @@ namespace NGit.Transport
 
7501
@@ -949,7 +949,7 @@ namespace NGit.Transport
6308
7502
                {
6309
7503
                        /// <exception cref="NGit.Errors.TransportException"></exception>
6310
7504
                        internal SmartHttpPushConnection(TransportHttp _enclosing, InputStream advertisement
6313
7507
                        {
6314
7508
                                this._enclosing = _enclosing;
6315
7509
                                this.statelessRPC = true;
6316
 
@@ -918,7 +918,7 @@ namespace NGit.Transport
 
7510
@@ -962,7 +962,7 @@ namespace NGit.Transport
6317
7511
                        protected internal override void DoPush(ProgressMonitor monitor, IDictionary<string
6318
7512
                                , RemoteRefUpdate> refUpdates)
6319
7513
                        {
6320
 
-                               TransportHttp.Service svc = new TransportHttp.Service(this, TransportHttp.SVC_RECEIVE_PACK
6321
 
+                               TransportHttp.Service svc = new TransportHttp.Service(_enclosing, TransportHttp.SVC_RECEIVE_PACK
6322
 
                                        );
6323
 
                                this.Init(svc.@in, svc.@out);
 
7514
-                               TransportHttp.Service svc = new TransportHttp.MultiRequestService(this, TransportHttp
 
7515
+                               TransportHttp.Service svc = new TransportHttp.MultiRequestService(_enclosing, TransportHttp
 
7516
                                        .SVC_RECEIVE_PACK);
 
7517
                                this.Init(svc.GetInputStream(), svc.GetOutputStream());
6324
7518
                                base.DoPush(monitor, refUpdates);
6325
 
@@ -1062,14 +1062,14 @@ namespace NGit.Transport
6326
 
                                this.@in.Add(this._enclosing.OpenInputStream(this.conn));
6327
 
                                if (!this.finalRequest)
6328
 
                                {
6329
 
-                                       this.@in.Add(this.execute);
6330
 
+                               this.@in.Add(this.execute);
6331
 
                                }
6332
 
                                this.conn = null;
6333
 
                        }
 
7519
@@ -1016,41 +1016,41 @@ namespace NGit.Transport
 
7520
                        /// <exception cref="System.IO.IOException"></exception>
 
7521
                        internal virtual void SendRequest()
 
7522
                        {
 
7523
-                               // Try to compress the content, but only if that is smaller.
 
7524
-                               TemporaryBuffer buf = new TemporaryBuffer.Heap(this._enclosing.http.postBuffer);
 
7525
-                               try
 
7526
-                               {
 
7527
-                                       GZIPOutputStream gzip = new GZIPOutputStream(buf);
 
7528
-                                       this.@out.WriteTo(gzip, null);
 
7529
-                                       gzip.Close();
 
7530
-                                       if (this.@out.Length() < buf.Length())
 
7531
+                                       // Try to compress the content, but only if that is smaller.
 
7532
+                                       TemporaryBuffer buf = new TemporaryBuffer.Heap(this._enclosing.http.postBuffer);
 
7533
+                                       try
 
7534
                                        {
 
7535
+                                               GZIPOutputStream gzip = new GZIPOutputStream(buf);
 
7536
+                                               this.@out.WriteTo(gzip, null);
 
7537
+                                               gzip.Close();
 
7538
+                                               if (this.@out.Length() < buf.Length())
 
7539
+                                               {
 
7540
+                                                       buf = this.@out;
 
7541
+                                               }
 
7542
+                                       }
 
7543
+                                       catch (IOException)
 
7544
+                                       {
 
7545
+                                               // Most likely caused by overflowing the buffer, meaning
 
7546
+                                               // its larger if it were compressed. Don't compress.
 
7547
                                                buf = this.@out;
 
7548
                                        }
 
7549
+                                       this.OpenStream();
 
7550
+                                       if (buf != this.@out)
 
7551
+                                       {
 
7552
+                                               this.conn.SetRequestProperty(HttpSupport.HDR_CONTENT_ENCODING, HttpSupport.ENCODING_GZIP
 
7553
+                                                       );
 
7554
+                                       }
 
7555
+                                       this.conn.SetFixedLengthStreamingMode((int)buf.Length());
 
7556
+                                       OutputStream httpOut = this.conn.GetOutputStream();
 
7557
+                                       try
 
7558
+                                       {
 
7559
+                                               buf.WriteTo(httpOut, null);
 
7560
+                                       }
 
7561
+                                       finally
 
7562
+                                       {
 
7563
+                                               httpOut.Close();
 
7564
+                                       }
 
7565
                                }
 
7566
-                               catch (IOException)
 
7567
-                               {
 
7568
-                                       // Most likely caused by overflowing the buffer, meaning
 
7569
-                                       // its larger if it were compressed. Don't compress.
 
7570
-                                       buf = this.@out;
 
7571
-                               }
 
7572
-                               this.OpenStream();
 
7573
-                               if (buf != this.@out)
 
7574
-                               {
 
7575
-                                       this.conn.SetRequestProperty(HttpSupport.HDR_CONTENT_ENCODING, HttpSupport.ENCODING_GZIP
 
7576
-                                               );
 
7577
-                               }
 
7578
-                               this.conn.SetFixedLengthStreamingMode((int)buf.Length());
 
7579
-                               OutputStream httpOut = this.conn.GetOutputStream();
 
7580
-                               try
 
7581
-                               {
 
7582
-                                       buf.WriteTo(httpOut, null);
 
7583
-                               }
 
7584
-                               finally
 
7585
-                               {
 
7586
-                                       httpOut.Close();
 
7587
-                               }
 
7588
-                       }
 
7589
 
 
7590
                        /// <exception cref="System.IO.IOException"></exception>
 
7591
                        internal virtual void OpenResponse()
 
7592
@@ -1068,17 +1068,17 @@ namespace NGit.Transport
 
7593
                                        this.conn.GetInputStream().Close();
 
7594
                                        throw this._enclosing.WrongContentType(this.responseType, contentType);
 
7595
                                }
 
7596
-                       }
 
7597
+                               }
 
7598
 
 
7599
                        internal virtual TransportHttp.Service.HttpOutputStream GetOutputStream()
 
7600
                        {
 
7601
                                return this.@out;
 
7602
-                       }
 
7603
+                               }
 
7604
 
 
7605
                        internal virtual InputStream GetInputStream()
 
7606
-                       {
 
7607
+                               {
 
7608
                                return this.@in;
 
7609
-                       }
 
7610
+                               }
 
7611
 
 
7612
                        /// <exception cref="System.IO.IOException"></exception>
 
7613
                        internal abstract void Execute();
 
7614
@@ -1116,7 +1116,7 @@ namespace NGit.Transport
6334
7615
 
6335
7616
                        internal class HttpOutputStream : TemporaryBuffer
6336
7617
                        {
6339
7620
                                        .postBuffer)
6340
7621
                                {
6341
7622
                                        this._enclosing = _enclosing;
 
7623
@@ -1162,7 +1162,7 @@ namespace NGit.Transport
 
7624
                        internal bool finalRequest;
 
7625
 
 
7626
                        internal MultiRequestService(TransportHttp _enclosing, string serviceName) : base
 
7627
-                               (_enclosing)
 
7628
+                               (_enclosing, serviceName)
 
7629
                        {
 
7630
                                this._enclosing = _enclosing;
 
7631
                        }
 
7632
@@ -1209,7 +1209,7 @@ namespace NGit.Transport
 
7633
                internal class LongPollService : TransportHttp.Service
 
7634
                {
 
7635
                        /// <param name="serviceName"></param>
 
7636
-                       internal LongPollService(TransportHttp _enclosing, string serviceName) : base(_enclosing
 
7637
+                       internal LongPollService(TransportHttp _enclosing, string serviceName) : base(_enclosing, serviceName
 
7638
                                )
 
7639
                        {
 
7640
                                this._enclosing = _enclosing;
6342
7641
diff --git a/NGit/NGit.Transport/TransportLocal.cs b/NGit/NGit.Transport/TransportLocal.cs
6343
 
index d076db7..3a99af0 100644
 
7642
index a34b819..b441e92 100644
6344
7643
--- a/NGit/NGit.Transport/TransportLocal.cs
6345
7644
+++ b/NGit/NGit.Transport/TransportLocal.cs
6346
7645
@@ -194,15 +194,15 @@ namespace NGit.Transport
6414
7713
                                this._enclosing = _enclosing;
6415
7714
                                MessageWriter msg = new MessageWriter();
6416
7715
diff --git a/NGit/NGit.Transport/TransportProtocol.cs b/NGit/NGit.Transport/TransportProtocol.cs
6417
 
index ba4dc69..917373b 100644
 
7716
index 1363d37..512dd74 100644
6418
7717
--- a/NGit/NGit.Transport/TransportProtocol.cs
6419
7718
+++ b/NGit/NGit.Transport/TransportProtocol.cs
6420
 
@@ -109,7 +109,7 @@ namespace NGit.Transport
 
7719
@@ -111,7 +111,7 @@ namespace NGit.Transport
6421
7720
                /// <returns>immutable set of schemes supported by this protocol.</returns>
6422
7721
                public virtual ICollection<string> GetSchemes()
6423
7722
                {
6426
7725
                }
6427
7726
 
6428
7727
                /// <returns>immutable set of URIishFields that must be filled in.</returns>
6429
 
@@ -122,7 +122,7 @@ namespace NGit.Transport
 
7728
@@ -124,7 +124,7 @@ namespace NGit.Transport
6430
7729
                /// <returns>immutable set of URIishFields that may be filled in.</returns>
6431
7730
                public virtual ICollection<TransportProtocol.URIishField> GetOptionalFields()
6432
7731
                {
6436
7735
 
6437
7736
                /// <returns>if a port is supported, the default port, else -1.</returns>
6438
7737
diff --git a/NGit/NGit.Transport/TransportSftp.cs b/NGit/NGit.Transport/TransportSftp.cs
6439
 
index a683ecd..a5a6b88 100644
 
7738
index 100f4a4..8f3eeae 100644
6440
7739
--- a/NGit/NGit.Transport/TransportSftp.cs
6441
7740
+++ b/NGit/NGit.Transport/TransportSftp.cs
6442
7741
@@ -49,6 +49,7 @@ using NGit.Internal;
6475
7774
                                {
6476
7775
                                        list = this.ftp.Ls(dir);
6477
7776
diff --git a/NGit/NGit.Transport/URIish.cs b/NGit/NGit.Transport/URIish.cs
6478
 
index 61041de..b42018b 100644
 
7777
index c8c2ca5..aeb3aec 100644
6479
7778
--- a/NGit/NGit.Transport/URIish.cs
6480
7779
+++ b/NGit/NGit.Transport/URIish.cs
6481
7780
@@ -362,7 +362,7 @@ namespace NGit.Transport
6788
8087
        }
6789
8088
 }
6790
8089
diff --git a/NGit/NGit.Transport/WalkFetchConnection.cs b/NGit/NGit.Transport/WalkFetchConnection.cs
6791
 
index aeb824c..c6c898e 100644
 
8090
index ce61b4e..031560f 100644
6792
8091
--- a/NGit/NGit.Transport/WalkFetchConnection.cs
6793
8092
+++ b/NGit/NGit.Transport/WalkFetchConnection.cs
6794
8093
@@ -557,7 +557,7 @@ namespace NGit.Transport
6836
8135
                                paths = p;
6837
8136
                                Arrays.Sort(paths, PATH_SORT);
6838
8137
diff --git a/NGit/NGit.Treewalk/WorkingTreeIterator.cs b/NGit/NGit.Treewalk/WorkingTreeIterator.cs
6839
 
index 92c7002..1c2f3a3 100644
 
8138
index 5a6866d..b865f67 100644
6840
8139
--- a/NGit/NGit.Treewalk/WorkingTreeIterator.cs
6841
8140
+++ b/NGit/NGit.Treewalk/WorkingTreeIterator.cs
6842
 
@@ -587,6 +587,7 @@ namespace NGit.Treewalk
 
8141
@@ -600,6 +600,7 @@ namespace NGit.Treewalk
6843
8142
 
6844
8143
                private void ParseEntry()
6845
8144
                {
6847
8146
                        WorkingTreeIterator.Entry e = entries[ptr];
6848
8147
                        mode = e.GetMode().GetBits();
6849
8148
                        int nameLen = e.encodedNameLen;
6850
 
@@ -687,10 +688,16 @@ namespace NGit.Treewalk
 
8149
@@ -700,10 +701,16 @@ namespace NGit.Treewalk
6851
8150
                ///     </exception>
6852
8151
                protected internal virtual bool IsEntryIgnored(int pLen)
6853
8152
                {
6866
8165
                        IgnoreNode rules = GetIgnoreNode();
6867
8166
                        if (rules != null)
6868
8167
                        {
6869
 
@@ -708,13 +715,11 @@ namespace NGit.Treewalk
 
8168
@@ -721,13 +728,11 @@ namespace NGit.Treewalk
6870
8169
                                {
6871
8170
                                        case IgnoreNode.MatchResult.IGNORED:
6872
8171
                                        {
6880
8179
                                                return false;
6881
8180
                                        }
6882
8181
 
6883
 
@@ -726,14 +731,11 @@ namespace NGit.Treewalk
 
8182
@@ -739,14 +744,11 @@ namespace NGit.Treewalk
6884
8183
                        }
6885
8184
                        if (parent is NGit.Treewalk.WorkingTreeIterator)
6886
8185
                        {
6897
8196
                /// <exception cref="System.IO.IOException"></exception>
6898
8197
                private IgnoreNode GetIgnoreNode()
6899
8198
                {
6900
 
@@ -1138,7 +1140,7 @@ namespace NGit.Treewalk
 
8199
@@ -1163,7 +1165,7 @@ namespace NGit.Treewalk
6901
8200
 
6902
8201
                /// <summary>A single entry within a working directory tree.</summary>
6903
8202
                /// <remarks>A single entry within a working directory tree.</remarks>
6907
8206
                        internal byte[] encodedName;
6908
8207
 
6909
8208
diff --git a/NGit/NGit.Util.IO/InterruptTimer.cs b/NGit/NGit.Util.IO/InterruptTimer.cs
6910
 
index b7c3b4b..86955d4 100644
 
8209
index 443ce45..e4eed07 100644
6911
8210
--- a/NGit/NGit.Util.IO/InterruptTimer.cs
6912
8211
+++ b/NGit/NGit.Util.IO/InterruptTimer.cs
6913
8212
@@ -163,7 +163,7 @@ namespace NGit.Util.IO
6949
8248
                private const int BUFFER_SIZE = 1024;
6950
8249
 
6951
8250
diff --git a/NGit/NGit.Util/Base64.cs b/NGit/NGit.Util/Base64.cs
6952
 
index 93f45e3..1ebfe53 100644
 
8251
index 848036d..00bd50e 100644
6953
8252
--- a/NGit/NGit.Util/Base64.cs
6954
8253
+++ b/NGit/NGit.Util/Base64.cs
6955
8254
@@ -65,19 +65,19 @@ namespace NGit.Util
7194
8493
 
7195
8494
                        private readonly BlockList<T> _enclosing;
7196
8495
diff --git a/NGit/NGit.Util/FS.cs b/NGit/NGit.Util/FS.cs
7197
 
index 3177f8a..56397f5 100644
 
8496
index 3fec989..a527c93 100644
7198
8497
--- a/NGit/NGit.Util/FS.cs
7199
8498
+++ b/NGit/NGit.Util/FS.cs
7200
8499
@@ -90,7 +90,7 @@ namespace NGit.Util
7204
8503
-               public static NGit.Util.FS Detect(bool cygwinUsed)
7205
8504
+               public static NGit.Util.FS Detect(bool? cygwinUsed)
7206
8505
                {
7207
 
                        if (FS_Win32.IsWin32())
 
8506
                        if (SystemReader.GetInstance().IsWindows())
7208
8507
                        {
7209
8508
@@ -98,7 +98,7 @@ namespace NGit.Util
7210
8509
                                {
7215
8514
                                {
7216
8515
                                        return new FS_Win32_Cygwin();
7217
8516
                                }
7218
 
@@ -288,10 +288,14 @@ namespace NGit.Util
 
8517
@@ -292,10 +292,14 @@ namespace NGit.Util
7219
8518
                        {
7220
8519
                                foreach (string command in lookFor)
7221
8520
                                {
7248
8547
                {
7249
8548
                        try
7250
8549
diff --git a/NGit/NGit.Util/GitDateFormatter.cs b/NGit/NGit.Util/GitDateFormatter.cs
7251
 
index 9e5ee5f..514aa29 100644
 
8550
index f1a8721..0dbcb5e 100644
7252
8551
--- a/NGit/NGit.Util/GitDateFormatter.cs
7253
8552
+++ b/NGit/NGit.Util/GitDateFormatter.cs
7254
 
@@ -154,6 +154,7 @@ namespace NGit.Util
 
8553
@@ -156,6 +156,7 @@ namespace NGit.Util
7255
8554
                /// <returns>formatted version of date, time and time zone</returns>
7256
8555
                public virtual string FormatDate(PersonIdent ident)
7257
8556
                {
7259
8558
                        switch (format)
7260
8559
                        {
7261
8560
                                case GitDateFormatter.Format.RAW:
7262
 
@@ -189,7 +190,7 @@ namespace NGit.Util
 
8561
@@ -191,7 +192,7 @@ namespace NGit.Util
7263
8562
 
7264
8563
                                case GitDateFormatter.Format.LOCALE:
7265
8564
                                {
7268
8567
                                        if (tz == null)
7269
8568
                                        {
7270
8569
                                                tz = SystemReader.GetInstance().GetTimeZone();
 
8570
diff --git a/NGit/NGit.Util/GitDateParser.cs b/NGit/NGit.Util/GitDateParser.cs
 
8571
index a97a9a4..07573d6 100644
 
8572
--- a/NGit/NGit.Util/GitDateParser.cs
 
8573
+++ b/NGit/NGit.Util/GitDateParser.cs
 
8574
@@ -47,6 +47,8 @@ using System.Text;
 
8575
 using NGit.Internal;
 
8576
 using NGit.Util;
 
8577
 using Sharpen;
 
8578
+using System.Threading;
 
8579
+using System.Globalization;
 
8580
 
 
8581
 namespace NGit.Util
 
8582
 {
 
8583
@@ -73,18 +75,9 @@ namespace NGit.Util
 
8584
                        , SimpleDateFormat>>
 
8585
                {
 
8586
                        public _ThreadLocal_74()
 
8587
+                               : base (() => new Dictionary<GitDateParser.ParseableSimpleDateFormat, SimpleDateFormat>())
 
8588
                        {
 
8589
                        }
 
8590
-
 
8591
-                       // Since SimpleDateFormat instances are expensive to instantiate they should
 
8592
-                       // be cached. Since they are also not threadsafe they are cached using
 
8593
-                       // ThreadLocal.
 
8594
-                       protected override IDictionary<GitDateParser.ParseableSimpleDateFormat, SimpleDateFormat
 
8595
-                               > InitialValue()
 
8596
-                       {
 
8597
-                               return new Dictionary<GitDateParser.ParseableSimpleDateFormat, SimpleDateFormat>(
 
8598
-                                       );
 
8599
-                       }
 
8600
                }
 
8601
 
 
8602
                private static ThreadLocal<IDictionary<GitDateParser.ParseableSimpleDateFormat, SimpleDateFormat
 
8603
@@ -97,7 +90,7 @@ namespace NGit.Util
 
8604
                         f)
 
8605
                {
 
8606
                        IDictionary<GitDateParser.ParseableSimpleDateFormat, SimpleDateFormat> map = formatCache
 
8607
-                               .Get();
 
8608
+                               .Value;
 
8609
                        SimpleDateFormat dateFormat = map.Get(f);
 
8610
                        if (dateFormat != null)
 
8611
                        {
 
8612
@@ -198,10 +191,10 @@ namespace NGit.Util
 
8613
                /// <see cref="System.DateTime">System.DateTime</see>
 
8614
                /// </returns>
 
8615
                /// <exception cref="Sharpen.ParseException">if the given dateStr was not recognized</exception>
 
8616
-               public static DateTime Parse(string dateStr, Calendar now)
 
8617
+               public static DateTime Parse(string dateStr, JavaCalendar now)
 
8618
                {
 
8619
                        dateStr = dateStr.Trim();
 
8620
-                       DateTime ret;
 
8621
+                       DateTime? ret;
 
8622
                        if (Sharpen.Runtime.EqualsIgnoreCase("never", dateStr))
 
8623
                        {
 
8624
                                return NEVER;
 
8625
@@ -209,7 +202,7 @@ namespace NGit.Util
 
8626
                        ret = Parse_relative(dateStr, now);
 
8627
                        if (ret != null)
 
8628
                        {
 
8629
-                               return ret;
 
8630
+                               return ret.Value;
 
8631
                        }
 
8632
                        foreach (GitDateParser.ParseableSimpleDateFormat f in GitDateParser.ParseableSimpleDateFormat
 
8633
                                .Values())
 
8634
@@ -246,9 +239,9 @@ namespace NGit.Util
 
8635
                }
 
8636
 
 
8637
                // tries to parse a string with a relative time specification
 
8638
-               private static DateTime Parse_relative(string dateStr, Calendar now)
 
8639
+               private static DateTime? Parse_relative(string dateStr, JavaCalendar now)
 
8640
                {
 
8641
-                       Calendar cal;
 
8642
+                       JavaCalendar cal;
 
8643
                        SystemReader sysRead = SystemReader.GetInstance();
 
8644
                        // check for the static words "yesterday" or "now"
 
8645
                        if ("now".Equals(dateStr))
 
8646
@@ -258,21 +251,21 @@ namespace NGit.Util
 
8647
                        }
 
8648
                        if (now == null)
 
8649
                        {
 
8650
-                               cal = new GregorianCalendar(sysRead.GetTimeZone(), sysRead.GetLocale());
 
8651
+                               cal = new JavaGregorianCalendar(sysRead.GetTimeZone(), sysRead.GetLocale());
 
8652
                                cal.SetTimeInMillis(sysRead.GetCurrentTime());
 
8653
                        }
 
8654
                        else
 
8655
                        {
 
8656
-                               cal = (Calendar)now.Clone();
 
8657
+                               cal = (JavaCalendar)now.Clone();
 
8658
                        }
 
8659
                        if ("yesterday".Equals(dateStr))
 
8660
                        {
 
8661
-                               cal.Add(Calendar.DATE, -1);
 
8662
-                               cal.Set(Calendar.HOUR_OF_DAY, 0);
 
8663
-                               cal.Set(Calendar.MINUTE, 0);
 
8664
-                               cal.Set(Calendar.SECOND, 0);
 
8665
-                               cal.Set(Calendar.MILLISECOND, 0);
 
8666
-                               cal.Set(Calendar.MILLISECOND, 0);
 
8667
+                               cal.Add(JavaCalendar.DATE, -1);
 
8668
+                               cal.Set(JavaCalendar.HOUR_OF_DAY, 0);
 
8669
+                               cal.Set(JavaCalendar.MINUTE, 0);
 
8670
+                               cal.Set(JavaCalendar.SECOND, 0);
 
8671
+                               cal.Set(JavaCalendar.MILLISECOND, 0);
 
8672
+                               cal.Set(JavaCalendar.MILLISECOND, 0);
 
8673
                                return cal.GetTime();
 
8674
                        }
 
8675
                        // parse constructs like "3 days ago", "5.week.2.day.ago"
 
8676
@@ -298,43 +291,43 @@ namespace NGit.Util
 
8677
                                }
 
8678
                                if ("year".Equals(parts[i + 1]) || "years".Equals(parts[i + 1]))
 
8679
                                {
 
8680
-                                       cal.Add(Calendar.YEAR, -number);
 
8681
+                                       cal.Add(JavaCalendar.YEAR, -number);
 
8682
                                }
 
8683
                                else
 
8684
                                {
 
8685
                                        if ("month".Equals(parts[i + 1]) || "months".Equals(parts[i + 1]))
 
8686
                                        {
 
8687
-                                               cal.Add(Calendar.MONTH, -number);
 
8688
+                                               cal.Add(JavaCalendar.MONTH, -number);
 
8689
                                        }
 
8690
                                        else
 
8691
                                        {
 
8692
                                                if ("week".Equals(parts[i + 1]) || "weeks".Equals(parts[i + 1]))
 
8693
                                                {
 
8694
-                                                       cal.Add(Calendar.WEEK_OF_YEAR, -number);
 
8695
+                                                       cal.Add(JavaCalendar.WEEK_OF_YEAR, -number);
 
8696
                                                }
 
8697
                                                else
 
8698
                                                {
 
8699
                                                        if ("day".Equals(parts[i + 1]) || "days".Equals(parts[i + 1]))
 
8700
                                                        {
 
8701
-                                                               cal.Add(Calendar.DATE, -number);
 
8702
+                                                               cal.Add(JavaCalendar.DATE, -number);
 
8703
                                                        }
 
8704
                                                        else
 
8705
                                                        {
 
8706
                                                                if ("hour".Equals(parts[i + 1]) || "hours".Equals(parts[i + 1]))
 
8707
                                                                {
 
8708
-                                                                       cal.Add(Calendar.HOUR_OF_DAY, -number);
 
8709
+                                                                       cal.Add(JavaCalendar.HOUR_OF_DAY, -number);
 
8710
                                                                }
 
8711
                                                                else
 
8712
                                                                {
 
8713
                                                                        if ("minute".Equals(parts[i + 1]) || "minutes".Equals(parts[i + 1]))
 
8714
                                                                        {
 
8715
-                                                                               cal.Add(Calendar.MINUTE, -number);
 
8716
+                                                                               cal.Add(JavaCalendar.MINUTE, -number);
 
8717
                                                                        }
 
8718
                                                                        else
 
8719
                                                                        {
 
8720
                                                                                if ("second".Equals(parts[i + 1]) || "seconds".Equals(parts[i + 1]))
 
8721
                                                                                {
 
8722
-                                                                                       cal.Add(Calendar.SECOND, -number);
 
8723
+                                                                                       cal.Add(JavaCalendar.SECOND, -number);
 
8724
                                                                                }
 
8725
                                                                                else
 
8726
                                                                                {
7271
8727
diff --git a/NGit/NGit.Util/IOUtil.cs b/NGit/NGit.Util/IOUtil.cs
7272
 
index 887dc37..fac76f8 100644
 
8728
index 5b34a3a..b3ce00e 100644
7273
8729
--- a/NGit/NGit.Util/IOUtil.cs
7274
8730
+++ b/NGit/NGit.Util/IOUtil.cs
7275
8731
@@ -263,36 +263,6 @@ namespace NGit.Util
7323
8779
                        return b.ToString();
7324
8780
                }
7325
8781
diff --git a/NGit/NGit.Util/RawParseUtils.cs b/NGit/NGit.Util/RawParseUtils.cs
7326
 
index 7f45741..42e3fa4 100644
 
8782
index 690ee31..78bcf5c 100644
7327
8783
--- a/NGit/NGit.Util/RawParseUtils.cs
7328
8784
+++ b/NGit/NGit.Util/RawParseUtils.cs
7329
 
@@ -56,7 +56,7 @@ namespace NGit.Util
7330
 
        {
 
8785
@@ -61,7 +61,7 @@ namespace NGit.Util
 
8786
 
7331
8787
                private static readonly byte[] digits10;
7332
8788
 
7333
8789
-               private static readonly byte[] digits16;
7335
8791
 
7336
8792
                private static readonly byte[] footerLineKeyChars;
7337
8793
 
7338
 
@@ -72,19 +72,19 @@ namespace NGit.Util
 
8794
@@ -77,19 +77,19 @@ namespace NGit.Util
7339
8795
                        {
7340
8796
                                digits10[i] = unchecked((byte)(i - (byte)('0')));
7341
8797
                        }
7360
8816
                        }
7361
8817
                        footerLineKeyChars = new byte[(byte)('z') + 1];
7362
8818
                        footerLineKeyChars[(byte)('-')] = 1;
7363
 
@@ -407,8 +407,8 @@ namespace NGit.Util
 
8819
@@ -412,8 +412,8 @@ namespace NGit.Util
7364
8820
                ///     </exception>
7365
8821
                public static int ParseHexInt4(byte digit)
7366
8822
                {
7515
8971
                        {
7516
8972
                                return this.@ref.ToString();
7517
8973
diff --git a/NGit/NGit.Util/StringUtils.cs b/NGit/NGit.Util/StringUtils.cs
7518
 
index a2786e0..8def66b 100644
 
8974
index 3fa3912..1823f15 100644
7519
8975
--- a/NGit/NGit.Util/StringUtils.cs
7520
8976
+++ b/NGit/NGit.Util/StringUtils.cs
7521
8977
@@ -58,7 +58,7 @@ namespace NGit.Util
7527
8983
                        {
7528
8984
                                LC[c] = c;
7529
8985
                        }
7530
 
@@ -214,13 +214,13 @@ namespace NGit.Util
 
8986
@@ -216,13 +216,13 @@ namespace NGit.Util
7531
8987
                        {
7532
8988
                                throw new ArgumentNullException(JGitText.Get().expectedBooleanStringValue);
7533
8989
                        }
7543
8999
                }
7544
9000
 
7545
9001
                /// <summary>Parse a string as a standard Git boolean value.</summary>
7546
 
@@ -264,7 +264,7 @@ namespace NGit.Util
 
9002
@@ -266,7 +266,7 @@ namespace NGit.Util
7547
9003
                /// or null in case the
7548
9004
                /// string does not represent a boolean value
7549
9005
                /// </returns>
7553
9009
                        if (stringValue == null)
7554
9010
                        {
7555
9011
diff --git a/NGit/NGit/AnyObjectId.cs b/NGit/NGit/AnyObjectId.cs
7556
 
index cd36c35..73ab866 100644
 
9012
index ade19f6..d9931eb 100644
7557
9013
--- a/NGit/NGit/AnyObjectId.cs
7558
9014
+++ b/NGit/NGit/AnyObjectId.cs
7559
 
@@ -549,7 +549,7 @@ namespace NGit
 
9015
@@ -59,7 +59,7 @@ namespace NGit
 
9016
        /// with this instance can alter at any time, if this instance is modified to
 
9017
        /// represent a different object name.
 
9018
        /// </remarks>
 
9019
-       public abstract class AnyObjectId : Comparable<object>
 
9020
+       public abstract class AnyObjectId : System.IComparable<object>
 
9021
        {
 
9022
                /// <summary>Compare to object identifier byte sequences for equality.</summary>
 
9023
                /// <remarks>Compare to object identifier byte sequences for equality.</remarks>
 
9024
@@ -548,7 +548,7 @@ namespace NGit
7560
9025
                }
7561
9026
 
7562
9027
                /// <returns>string form of the SHA-1, in lower case hexadecimal.</returns>
7566
9031
                        return Name;
7567
9032
                }
7568
9033
diff --git a/NGit/NGit/BaseRepositoryBuilder.cs b/NGit/NGit/BaseRepositoryBuilder.cs
7569
 
index d0bd012..03b72b9 100644
 
9034
index 83e1b57..b89d7cd 100644
7570
9035
--- a/NGit/NGit/BaseRepositoryBuilder.cs
7571
9036
+++ b/NGit/NGit/BaseRepositoryBuilder.cs
7572
9037
@@ -65,7 +65,7 @@ namespace NGit
7578
9043
        {
7579
9044
                private static bool IsSymRef(byte[] @ref)
7580
9045
                {
7581
 
@@ -716,7 +716,7 @@ namespace NGit
 
9046
@@ -763,7 +763,7 @@ namespace NGit
7582
9047
                /// </exception>
7583
9048
                public virtual R Build()
7584
9049
                {
7587
9052
                        if (IsMustExist() && !repo.ObjectDatabase.Exists())
7588
9053
                        {
7589
9054
                                throw new RepositoryNotFoundException(GetGitDir());
7590
 
@@ -947,7 +947,20 @@ namespace NGit
 
9055
@@ -968,7 +968,20 @@ namespace NGit
7591
9056
                /// </returns>
7592
9057
                protected internal B Self()
7593
9058
                {
7610
9075
+        
7611
9076
 }
7612
9077
diff --git a/NGit/NGit/Config.cs b/NGit/NGit/Config.cs
7613
 
index cd8e6be..029e230 100644
 
9078
index a7a3100..7055b72 100644
7614
9079
--- a/NGit/NGit/Config.cs
7615
9080
+++ b/NGit/NGit/Config.cs
7616
9081
@@ -94,7 +94,7 @@ namespace NGit
7699
9164
                        SetString(section, subsection, name, n);
7700
9165
                }
7701
9166
 
 
9167
@@ -1402,8 +1402,7 @@ namespace NGit
 
9168
 
 
9169
                                                default:
 
9170
                                                {
 
9171
-                                                       throw new ConfigInvalidException(MessageFormat.Format(JGitText.Get().badEscape, char
 
9172
-                                                               .ValueOf(((char)c))));
 
9173
+                                                       throw new ConfigInvalidException(MessageFormat.Format(JGitText.Get().badEscape, c));
 
9174
                                                }
 
9175
                                        }
 
9176
                                }
7702
9177
diff --git a/NGit/NGit/ConfigSnapshot.cs b/NGit/NGit/ConfigSnapshot.cs
7703
9178
index 7ae2f50..304027f 100644
7704
9179
--- a/NGit/NGit/ConfigSnapshot.cs
7741
9216
                        private readonly IDictionary<string, string> names;
7742
9217
 
7743
9218
diff --git a/NGit/NGit/IndexDiff.cs b/NGit/NGit/IndexDiff.cs
7744
 
index 4779543..a84357c 100644
 
9219
index 4779543..f8fac1b 100644
7745
9220
--- a/NGit/NGit/IndexDiff.cs
7746
9221
+++ b/NGit/NGit/IndexDiff.cs
7747
9222
@@ -83,7 +83,7 @@ namespace NGit
7753
9228
                        {
7754
9229
                                this.monitor = monitor;
7755
9230
                                this.total = total;
 
9231
@@ -452,7 +452,7 @@ namespace NGit
 
9232
                /// <returns>list of folders containing only untracked files/folders</returns>
 
9233
                public virtual ICollection<string> GetUntrackedFolders()
 
9234
                {
 
9235
-                       return ((indexDiffFilter == null) ? Sharpen.Collections.EmptySet<string>() : new 
 
9236
+                       return ((indexDiffFilter == null || indexDiffFilter.GetUntrackedFolders ().Count == 0) ? Sharpen.Collections.EmptySet<string>() : new 
 
9237
                                HashSet<string>(indexDiffFilter.GetUntrackedFolders()));
 
9238
                }
 
9239
 
7756
9240
diff --git a/NGit/NGit/ObjectIdOwnerMap.cs b/NGit/NGit/ObjectIdOwnerMap.cs
7757
9241
index b9e1849..3447dbf 100644
7758
9242
--- a/NGit/NGit/ObjectIdOwnerMap.cs
7858
9342
                        public _AsyncObjectSizeQueue_354(ObjectReader _enclosing, Iterator<T> idItr)
7859
9343
                        {
7860
9344
diff --git a/NGit/NGit/Repository.cs b/NGit/NGit/Repository.cs
7861
 
index de9d80a..4a2d21a 100644
 
9345
index 37656ec..b5f81a2 100644
7862
9346
--- a/NGit/NGit/Repository.cs
7863
9347
+++ b/NGit/NGit/Repository.cs
7864
 
@@ -962,7 +962,7 @@ namespace NGit
 
9348
@@ -1173,7 +1173,7 @@ namespace NGit
7865
9349
                /// <returns>unmodifiable collection of other known objects.</returns>
7866
9350
                public virtual ICollection<ObjectId> GetAdditionalHaves()
7867
9351
                {
7870
9354
                }
7871
9355
 
7872
9356
                /// <summary>Get a ref by name.</summary>
7873
 
@@ -1047,9 +1047,9 @@ namespace NGit
 
9357
@@ -1258,9 +1258,9 @@ namespace NGit
7874
9358
                        IDictionary<string, Ref> allRefs = GetAllRefs();
7875
9359
                        IDictionary<AnyObjectId, ICollection<Ref>> ret = new Dictionary<AnyObjectId, ICollection
7876
9360
                                <Ref>>(allRefs.Count);