Show current branch name in staging view
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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)}">
|
||||
|
||||
Reference in New Issue
Block a user