|
1 | 1 | using System;
|
| 2 | +using System.Collections.Generic; |
2 | 3 | using LibGit2Sharp.Handlers;
|
3 | 4 |
|
4 | 5 | namespace LibGit2Sharp
|
@@ -61,11 +62,23 @@ public interface IRepository : IDisposable
|
61 | 62 | Diff Diff {get;}
|
62 | 63 |
|
63 | 64 | /// <summary>
|
64 |
| - /// Checkout the specified branch, reference or SHA. |
| 65 | + /// Gets the database. |
65 | 66 | /// </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); |
69 | 82 |
|
70 | 83 | /// <summary>
|
71 | 84 | /// Checkout the specified branch, reference or SHA.
|
@@ -103,5 +116,25 @@ public interface IRepository : IDisposable
|
103 | 116 | /// <param name = "amendPreviousCommit">True to amend the current <see cref = "Commit"/> pointed at by <see cref = "Repository.Head"/>, false otherwise.</param>
|
104 | 117 | /// <returns>The generated <see cref = "Commit" />.</returns>
|
105 | 118 | 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(); |
106 | 139 | }
|
107 | 140 | }
|
0 commit comments