8000 Align IRepository with public Repository members · Saaman/libgit2sharp@2559030 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2559030

Browse files
committed
Align IRepository with public Repository members
1 parent 30b554c commit 2559030

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

LibGit2Sharp/IRepository.cs

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using LibGit2Sharp.Handlers;
34

45
namespace LibGit2Sharp
@@ -61,11 +62,23 @@ public interface IRepository : IDisposable
6162
Diff Diff {get;}
6263

6364
/// <summary>
64-
/// Checkout the specified branch, reference or SHA.
65+
/// Gets the database.
6566
/// </summary>
66-
/// <param name = "commitishOrBranchSpec">A revparse spec for the commit or branch to checkout.</param>
67-
/// <returns>The new HEAD.</returns>
68-
Branch Checkout(string commitishOrBranchSpec);
67+
ObjectDatabase ObjectDatabase { get; }
68+
69+
/// <summary>
70+
/// Lookup notes in the repository.
71+
/// </summary>
72+
NoteCollection Notes { get; }
73+
74+
/// <summary>
75+
/// Checkout the specified <see cref = "Branch" />.
76+
/// </summary>
77+
/// <param name="branch">The <see cref = "Branch" /> to check out. </param>
78+
/// <param name="checkoutOptions"><see cref = "CheckoutOptions" /> controlling checkout behavior.</param>
79+
/// <param name="onCheckoutProgress"><see cref = "CheckoutProgressHandler" /> that checkout progress is reported through.</param>
80+
/// <returns>The <see cref = "Branch" /> that was checked out.</returns>
81+
Branch Checkout(Branch branch, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress);
6982

7083
/// <summary>
7184
/// Checkout the specified branch, reference or SHA.
@@ -103,5 +116,25 @@ public interface IRepository : IDisposable
103116
/// <param name = "amendPreviousCommit">True to amend the current <see cref = "Commit"/> pointed at by <see cref = "Repository.Head"/>, false otherwise.</param>
104117
/// <returns>The generated <see cref = "Commit" />.</returns>
105118
Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false);
119+
120+
/// <summary>
121+
/// Sets the current <see cref = "Repository.Head" /> to the specified commit and optionally resets the <see cref = "Repository.Index" /> and
122+
/// the content of the working tree to match.
123+
/// </summary>
124+
/// <param name = "resetOptions">Flavor of reset operation to perform.</param>
125+
/// <param name = "commitish">A revparse spec for the target commit object.</param>
126+
void Reset(ResetOptions resetOptions, string commitish = "HEAD");
127+
128+
/// <summary>
129+
/// Replaces entries in the <see cref="Repository.Index"/> with entries from the specified commit.
130+
/// </summary>
131+
/// <param name = "commitish">A revparse spec for the target commit object.</param>
132+
/// <param name = "paths">The list of paths (either files or directories) that should be considered.</param>
133+
void Reset(string commitish = "HEAD", IEnumerable<string> paths = null);
134+
135+
/// <summary>
136+
/// Clean the working tree by removing files that are not under version control.
137+
/// </summary>
138+
void RemoveUntrackedFiles();
106139
}
107140
}

0 commit comments

Comments
 (0)
0