Add unstage files feature
Add GitService.unstageFiles() using JGit reset to move files from
staged back to modified. Exposed via POST /repo/{name}/unstage
endpoint, repo page with checkboxes, and telnet menu option 7.
Includes unit tests for all layers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -55,14 +55,20 @@ New branch: <input type="text" name="branch" size="20">
|
||||
<p th:if="${#lists.isEmpty(modifiedFiles)}"><i>No modified files.</i></p>
|
||||
|
||||
<h3>Staged Files</h3>
|
||||
<table border="1" cellpadding="4" cellspacing="0" th:if="${!#lists.isEmpty(stagedFiles)}">
|
||||
<form method="post" th:action="@{/repo/{name}/unstage(name=${name})}" th:if="${!#lists.isEmpty(stagedFiles)}">
|
||||
<table border="1" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<th>Unstage</th>
|
||||
<th>File</th>
|
||||
</tr>
|
||||
<tr th:each="file : ${stagedFiles}">
|
||||
<td><input type="checkbox" name="files" th:value="${file}"></td>
|
||||
<td th:text="${file}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type="submit" value="Unstage Selected">
|
||||
</form>
|
||||
<p th:if="${#lists.isEmpty(stagedFiles)}"><i>No staged files.</i></p>
|
||||
|
||||
<form method="post" th:action="@{/repo/{name}/commit(name=${name})}" th:if="${!#lists.isEmpty(stagedFiles)}">
|
||||
|
||||
Reference in New Issue
Block a user