Skip to content

Commit 0d23180

Browse files
committed
remove unused IRepository fields/methods from IGitRepository
1 parent f4a2891 commit 0d23180

File tree

5 files changed

+22
-446
lines changed

5 files changed

+22
-446
lines changed
Lines changed: 4 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using System;
2-
using System.Collections.Generic;
32
using GitVersion;
43
using LibGit2Sharp;
5-
using Index = LibGit2Sharp.Index;
64

75
namespace GitVersionCore.Tests.Mocks
86
{
@@ -20,185 +18,7 @@ public void Dispose()
2018
{
2119
throw new NotImplementedException();
2220
}
23-
24-
public Branch Checkout(Branch branch, CheckoutOptions options, Signature signature = null)
25-
{
26-
throw new NotImplementedException();
27-
}
28-
29-
public Branch Checkout(string committishOrBranchSpec, CheckoutOptions options, Signature signature = null)
30-
{
31-
throw new NotImplementedException();
32-
}
33-
34-
public Branch Checkout(Commit commit, CheckoutOptions options, Signature signature = null)
35-
{
36-
throw new NotImplementedException();
37-
}
38-
39-
public void CheckoutPaths(string committishOrBranchSpec, IEnumerable<string> paths, CheckoutOptions checkoutOptions = null)
40-
{
41-
throw new NotImplementedException();
42-
}
43-
44-
public MergeResult MergeFetchedRefs(Signature merger, MergeOptions options)
45-
{
46-
throw new NotImplementedException();
47-
}
48-
49-
public CherryPickResult CherryPick(Commit commit, Signature committer, CherryPickOptions options = null)
50-
{
51-
throw new NotImplementedException();
52-
}
53-
54-
public GitObject Lookup(ObjectId id)
55-
{
56-
throw new NotImplementedException();
57-
}
58-
59-
public GitObject Lookup(string objectish)
60-
{
61-
throw new NotImplementedException();
62-
}
63-
64-
public GitObject Lookup(ObjectId id, ObjectType type)
65-
{
66-
throw new NotImplementedException();
67-
}
68-
69-
public GitObject Lookup(string objectish, ObjectType type)
70-
{
71-
return new MockCommit();
72-
}
73-
74-
public Commit Commit(string message, Signature author, Signature committer, CommitOptions options = null)
75-
{
76-
throw new NotImplementedException();
77-
}
78-
79-
public void Reset(ResetMode resetMode, Commit commit)
80-
{
81-
throw new NotImplementedException();
82-
}
83-
84-
public void Reset(ResetMode resetMode, Commit commit, CheckoutOptions options)
85-
{
86-
throw new NotImplementedException();
87-
}
88-
89-
public Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false)
90-
{
91-
throw new NotImplementedException();
92-
}
93-
94-
public void Reset(ResetMode resetMode, Commit commit, Signature signature = null, string logMessage = null)
95-
{
96-
throw new NotImplementedException();
97-
}
98-
99-
public void Reset(Commit commit, IEnumerable<string> paths = null, ExplicitPathsOptions explicitPathsOptions = null)
100-
{
101-
throw new NotImplementedException();
102-
}
103-
104-
public void RemoveUntrackedFiles()
105-
{
106-
throw new NotImplementedException();
107-
}
108-
109-
public RevertResult Revert(Commit commit, Signature reverter, RevertOptions options = null)
110-
{
111-
throw new NotImplementedException();
112-
}
113-
114-
public MergeResult Merge(Commit commit, Signature merger, MergeOptions options = null)
115-
{
116-
throw new NotImplementedException();
117-
}
118-
119-
public MergeResult Merge(Branch branch, Signature merger, MergeOptions options = null)
120-
{
121-
throw new NotImplementedException();
122-
}
123-
124-
public MergeResult Merge(string committish, Signature merger, MergeOptions options = null)
125-
{
126-
throw new NotImplementedException();
127-
}
128-
129-
public BlameHunkCollection Blame(string path, BlameOptions options = null)
130-
{
131-
throw new NotImplementedException();
132-
}
133-
134-
public void Stage(string path, StageOptions stageOptions)
135-
{
136-
throw new NotImplementedException();
137-
}
138-
139-
public void Stage(IEnumerable<string> paths, StageOptions stageOptions)
140-
{
141-
throw new NotImplementedException();
142-
}
143-
144-
public void Unstage(string path, ExplicitPathsOptions explicitPathsOptions)
145-
{
146-
throw new NotImplementedException();
147-
}
148-
149-
public void Unstage(IEnumerable<string> paths, ExplicitPathsOptions explicitPathsOptions)
150-
{
151-
throw new NotImplementedException();
152-
}
153-
154-
public void Move(string sourcePath, string destinationPath)
155-
{
156-
throw new NotImplementedException();
157-
}
158-
159-
public void Move(IEnumerable<string> sourcePaths, IEnumerable<string> destinationPaths)
160-
{
161-
throw new NotImplementedException();
162-
}
163-
164-
public void Remove(string path, bool removeFromWorkingDirectory, ExplicitPathsOptions explicitPathsOptions)
165-
{
166-
throw new NotImplementedException();
167-
}
168-
169-
public void Remove(IEnumerable<string> paths, bool removeFromWorkingDirectory, ExplicitPathsOptions explicitPathsOptions)
170-
{
171-
throw new NotImplementedException();
172-
}
173-
174-
public FileStatus RetrieveStatus(string filePath)
175-
{
176-
throw new NotImplementedException();
177-
}
178-
179-
public RepositoryStatus RetrieveStatus(StatusOptions options)
180-
{
181-
throw new NotImplementedException();
182-
}
183-
184-
public string Describe(Commit commit, DescribeOptions options)
185-
{
186-
throw new NotImplementedException();
187-
}
188-
189-
public void Checkout(Tree tree, IEnumerable<string> paths, CheckoutOptions opts)
190-
{
191-
throw new NotImplementedException();
192-
}
193-
194-
public void RevParse(string revision, out Reference reference, out GitObject obj)
195-
{
196-
throw new NotImplementedException();
197-
}
198-
19921
public Branch Head { get; set; }
200-
public LibGit2Sharp.Configuration Config { get; set; }
201-
public Index Index { get; set; }
20222
public ReferenceCollection Refs { get; set; }
20323

20424
public IQueryableCommitLog Commits
@@ -212,16 +32,11 @@ public IQueryableCommitLog Commits
21232
public RepositoryInformation Info { get; set; }
21333
public Diff Diff { get; set; }
21434
public ObjectDatabase ObjectDatabase { get; set; }
215-
public NoteCollection Notes { get; set; }
216-
public SubmoduleCollection Submodules { get; set; }
217-
public WorktreeCollection Worktrees { get; set; }
218-
public Rebase Rebase { get; private set; }
219-
220-
public Ignore Ignore => throw new NotImplementedException();
221-
22235
public Network Network { get; set; }
223-
224-
public StashCollection Stashes => throw new NotImplementedException();
36+
public RepositoryStatus RetrieveStatus()
37+
{
38+
throw new NotImplementedException();
39+
}
22540
public IGitRepositoryCommands Commands { get; }
22641
}
22742
}
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
using System;
12
using LibGit2Sharp;
23

34
namespace GitVersion
45
{
5-
public interface IGitRepository : IRepository
6+
public interface IGitRepository : IDisposable
67
{
78
IGitRepositoryCommands Commands { get; }
9+
ObjectDatabase ObjectDatabase { get; }
10+
IQueryableCommitLog Commits { get; }
11+
Branch Head { get; }
12+
BranchCollection Branches { get; }
13+
TagCollection Tags { get; }
14+
ReferenceCollection Refs { get; }
15+
Diff Diff { get; }
16+
RepositoryInformation Info { get; }
17+
Network Network { get; }
18+
RepositoryStatus RetrieveStatus();
819
}
920
}

src/GitVersionCore/Core/Abstractions/IGitRepositoryCommands.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,7 @@ namespace GitVersion
1010
public interface IGitRepositoryCommands
1111
{
1212
Branch Checkout(string committishOrBranchSpec);
13-
Branch Checkout(string committishOrBranchSpec, CheckoutOptions options);
1413
Branch Checkout(Branch branch);
15-
Branch Checkout(Branch branch, CheckoutOptions options);
16-
Branch Checkout(Commit commit);
17-
Branch Checkout(Commit commit, CheckoutOptions options);
18-
void Checkout(Tree tree, CheckoutOptions checkoutOptions, string refLogHeadSpec);
1914
void Fetch(string remote, IEnumerable<string> refspecs, FetchOptions options, string logMessage);
20-
void Move(string sourcePath, string destinationPath);
21-
void Move(IEnumerable<string> sourcePaths, IEnumerable<string> destinationPaths);
22-
MergeResult Pull(Signature merger, PullOptions options);
23-
void Remove(string path, bool removeFromWorkingDirectory);
24-
void Remove(IEnumerable<string> paths);
25-
void Remove(IEnumerable<string> paths, bool removeFromWorkingDirectory, ExplicitPathsOptions explicitPathsOptions);
26-
void Remove(string path);
27-
void Remove(string path, bool removeFromWorkingDirectory, ExplicitPathsOptions explicitPathsOptions);
28-
void Stage(string path);
29-
void Stage(string path, StageOptions stageOptions);
30-
void Stage(IEnumerable<string> paths);
31-
void Stage(IEnumerable<string> paths, StageOptions stageOptions);
32-
void Unstage(string path);
33-
void Unstage(string path, ExplicitPathsOptions explicitPathsOptions);
34-
void Unstage(IEnumerable<string> paths);
35-
void Unstage(IEnumerable<string> paths, ExplicitPathsOptions explicitPathsOptions);
3615
}
3716
}

0 commit comments

Comments
 (0)