Show current branch name in staging view

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-27 11:12:13 +01:00
parent 04a69c323e
commit b0016767e8
2 changed files with 2 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ public class RepoController
public String changes(@PathVariable String name, Model model) throws IOException, GitAPIException
{
model.addAttribute("name", name);
model.addAttribute("branch", gitService.getCurrentBranch(name));
model.addAttribute("modifiedFiles", gitService.getModifiedFiles(name));
model.addAttribute("stagedFiles", gitService.getStagedFiles(name));
return "changes";

View File

@@ -5,6 +5,7 @@
</head>
<body>
<h2>Staging</h2>
<p>Branch: <b th:text="${branch}"></b></p>
<h3>Modified Files (unstaged)</h3>
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">